diff --git a/Gruntfile.js b/Gruntfile.js index ba81aaf62e..842817f3bb 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,6 @@ /*global module:false*/ var _ = require('lodash'); +var config = require('./config'); module.exports = function(grunt) { // Ported from shared @@ -234,6 +235,11 @@ module.exports = function(grunt) { grunt.registerTask('run:dev', [ 'build:dev', 'concurrent' ]); + if(config.NODE_ENV == 'production') + grunt.registerTask('default', ['build:prod']); + else + grunt.registerTask('default', ['build:dev']); + // Load tasks grunt.loadNpmTasks('grunt-browserify'); grunt.loadNpmTasks('grunt-contrib-uglify'); diff --git a/package.json b/package.json index d426e1b28c..c12791cb65 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "scripts": { "test": "./test/run_tests.sh", "start": "grunt run:dev", - "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f; ./node_modules/.bin/grunt build:prod;", + "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f; ./node_modules/.bin/grunt;", "coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html" }, "devDependencies": {