var gulp = require('gulp');
var gutil = require('gulp-util');
+var env = require('gulp-env');
var argv = require('yargs').argv;
var production = !argv.dev && !argv.fast;
var dev = !!argv.dev && !argv.fast;
var output = argv.output || './src/main/webapp';
+var nodeEnv = production ? 'production' : 'development';
var styles = require('./gulp/styles').styles;
var scripts = require('./gulp/scripts');
+gulp.task('set-env', function () {
+ env({ vars: { 'NODE_ENV': nodeEnv } });
+});
+
gulp.task('scripts-sonar', function () {
return scripts.sonar(output, production);
});
gutil.log(gutil.colors.bgGreen('Watching for changes...'));
});
-gulp.task('default', ['build']);
\ No newline at end of file
+gulp.task('default', ['set-env', 'build']);
"gulp-autoprefixer": "^3.1.0",
"gulp-browserify": "0.5.1",
"gulp-concat": "2.6.0",
+ "gulp-env": "0.2.0",
"gulp-if": "2.0.0",
"gulp-less": "3.0.3",
"gulp-minify-css": "1.2.1",
"mocha": "2.3.3",
"moment": "2.10.6",
"numeral": "1.5.3",
- "react": "0.14.0",
- "react-addons-test-utils": "0.14.0",
- "react-dom": "0.14.0",
+ "react": "0.14.2",
+ "react-addons-test-utils": "0.14.2",
+ "react-dom": "0.14.2",
"sinon": "1.15.4",
"sinon-chai": "2.8.0",
"underscore": "1.8.3",