diff --git a/Gruntfile.js b/Gruntfile.js index ba81aaf62e..2fe125c003 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -234,6 +234,11 @@ module.exports = function(grunt) { grunt.registerTask('run:dev', [ 'build:dev', 'concurrent' ]); + if(process.env.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/website/config.json.example b/config.json.example similarity index 100% rename from website/config.json.example rename to config.json.example 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": { diff --git a/website/src/utils.js b/website/src/utils.js index 55cab68ede..9255223209 100644 --- a/website/src/utils.js +++ b/website/src/utils.js @@ -116,7 +116,7 @@ module.exports.setupConfig = function(){ nconf.argv() .env() //.file('defaults', path.join(path.resolve(__dirname, '../config.json.example'))) - .file('user', path.join(path.resolve(__dirname, '../config.json'))); + .file('user', path.join(path.resolve(__dirname, './../../config.json'))); if (nconf.get('NODE_ENV') === "development") Error.stackTraceLimit = Infinity; @@ -142,4 +142,4 @@ module.exports.decrypt = function(text){ var dec = decipher.update(text,'hex','utf8') dec += decipher.final('utf8'); return dec; -} \ No newline at end of file +}