Skip to content

Commit

Permalink
add --no-compress option to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Escalante committed Dec 15, 2012
1 parent 4069719 commit 44e8b41
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/commands/compile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@ var compiler = require('../roots'),
current_directory = path.normalize(process.cwd());
rimraf = require('rimraf');

var _compile = function(){
global.options.compress = true;
var _compile = function(no_compress){
if (no_compress[0] !== '--no-compress') { global.options.compress = true; }

rimraf.sync(path.join(current_directory, 'public'));
compiler.compile_project();
process.stdout.write('\nminifying & compressing...\n'.grey);
compiler.compile_project(function(){});

if (no_compress[0] !== '--no-compress') {
process.stdout.write('\nminifying & compressing...\n'.grey);
}
}

module.exports = { execute: _compile, needs_config: true }

0 comments on commit 44e8b41

Please sign in to comment.