You are here

function drush_minifyjs_minify_js_skip in Minify JS 7

Same name and namespace in other branches
  1. 8 minifyjs.drush.inc \drush_minifyjs_minify_js_skip()

Drush command logic. drush_[COMMAND_NAME]().

File

./minifyjs.drush.inc, line 62

Code

function drush_minifyjs_minify_js_skip() {
  drush_print('Minifying all JS files not currently minified...');
  module_load_include('inc', 'minifyjs', 'minifyjs.admin');
  $files = minifyjs_load_all_files();
  foreach ($files as $fid => $file) {
    if (!empty($file->minified_uri)) {
      $status = minifyjs_minify_file($fid);

      // Only output error messages.
      if ($status !== TRUE) {
        drush_print($status);
      }
    }
  }
  cache_clear_all(MINIFYJS_CACHE_CID, 'cache');
  drush_print('Complete!');
}