From f2fc1150347ee4f73e74b8738edb400a1740370a Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Tue, 3 Feb 2015 22:19:02 -0600 Subject: [PATCH] Set default gulp to be dependant on NODE_ENV --- gulpfile.js | 7 ++++++- package.json | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 287d51de23..02736c7720 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -17,6 +17,7 @@ var gulp = require('gulp'), spritesmith = require('gulp.spritesmith'), csso = require('gulp-csso'), cssmin = require('gulp-cssmin'), + config = require('./website/config'), pkg = require('./package'); var paths = { @@ -196,4 +197,8 @@ gulp.task('dev', ['watch'], function() { gulp.task('prod', ['clean', 'stylus', 'browserify', 'copy'], function() { // @TODO: Finish this }); -gulp.task('default', ['dev']); +if(config.NODE_ENV == 'development') { + gulp.task('default', ['dev']); +} else if(config.NODE_ENV == 'production') { + gulp.task('default', ['prod']); +} diff --git a/package.json b/package.json index f631c895d9..a824278808 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ }, "scripts": { "test": "./test/run_tests.sh", - "start": "gulp dev", + "start": "gulp", "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f", "coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html" },