mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-23 04:04:38 +02:00
Resolves #452 set NODE_ENV before browserify
This commit is contained in:
parent
c1854a0d96
commit
0f4ed5aada
2 changed files with 8 additions and 1 deletions
|
@ -211,6 +211,11 @@ module.exports = function(grunt) {
|
||||||
verbose: true,
|
verbose: true,
|
||||||
requirejs: false
|
requirejs: false
|
||||||
},
|
},
|
||||||
|
env: {
|
||||||
|
prod: {
|
||||||
|
NODE_ENV: 'production',
|
||||||
|
},
|
||||||
|
},
|
||||||
browserify: {
|
browserify: {
|
||||||
options: {
|
options: {
|
||||||
transform: [require('grunt-react').browserify]
|
transform: [require('grunt-react').browserify]
|
||||||
|
@ -235,9 +240,10 @@ module.exports = function(grunt) {
|
||||||
grunt.loadNpmTasks('grunt-jasmine-node');
|
grunt.loadNpmTasks('grunt-jasmine-node');
|
||||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||||
grunt.loadNpmTasks('grunt-react');
|
grunt.loadNpmTasks('grunt-react');
|
||||||
|
grunt.loadNpmTasks('grunt-env');
|
||||||
|
|
||||||
grunt.registerTask('build',
|
grunt.registerTask('build',
|
||||||
['clean', 'browserify', 'uglify', 'hash', 'buildIndex', 'shell:gitAdd', 'jasmine_node', 'jshint', 'lintStrings', 'compliment']
|
['clean', 'env', 'browserify', 'uglify', 'hash', 'buildIndex', 'shell:gitAdd', 'jasmine_node', 'jshint', 'lintStrings', 'compliment']
|
||||||
);
|
);
|
||||||
grunt.registerTask('lint', ['jshint', 'compliment']);
|
grunt.registerTask('lint', ['jshint', 'compliment']);
|
||||||
grunt.registerTask('fastBuild', ['clean', 'browserify', 'hash', 'buildIndexDev', 'jshint']);
|
grunt.registerTask('fastBuild', ['clean', 'browserify', 'hash', 'buildIndexDev', 'jshint']);
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
"grunt-contrib-clean": "~0.5.0",
|
"grunt-contrib-clean": "~0.5.0",
|
||||||
"grunt-contrib-jshint": "~0.7.2",
|
"grunt-contrib-jshint": "~0.7.2",
|
||||||
"grunt-contrib-uglify": "~0.2.7",
|
"grunt-contrib-uglify": "~0.2.7",
|
||||||
|
"grunt-env": "^0.4.4",
|
||||||
"grunt-hash": "~0.5.0",
|
"grunt-hash": "~0.5.0",
|
||||||
"grunt-jasmine-node": "~0.1.0",
|
"grunt-jasmine-node": "~0.1.0",
|
||||||
"grunt-jsxhint": "^0.5.0",
|
"grunt-jsxhint": "^0.5.0",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue