mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Adjusted grunt command so it behaves differently on production and
development
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
/*global module:false*/
|
/*global module:false*/
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
|
var config = require('./config');
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
|
|
||||||
// Ported from shared
|
// Ported from shared
|
||||||
@@ -234,6 +235,11 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
grunt.registerTask('run:dev', [ 'build:dev', 'concurrent' ]);
|
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
|
// Load tasks
|
||||||
grunt.loadNpmTasks('grunt-browserify');
|
grunt.loadNpmTasks('grunt-browserify');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "./test/run_tests.sh",
|
"test": "./test/run_tests.sh",
|
||||||
"start": "grunt run:dev",
|
"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"
|
"coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Reference in New Issue
Block a user