aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/gulpfile.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2015-11-16 10:06:21 +0100
committerStas Vilchik <vilchiks@gmail.com>2015-11-16 10:06:29 +0100
commita98695e8ce839f133cf7a814a53f2bc3df8d5cd6 (patch)
tree64d4d48200731b10816ffa1f28e3f509b239cfc1 /server/sonar-web/gulpfile.js
parent2b676da5ab6265e66534b735e82fcdfc7f32bb10 (diff)
downloadsonarqube-a98695e8ce839f133cf7a814a53f2bc3df8d5cd6.tar.gz
sonarqube-a98695e8ce839f133cf7a814a53f2bc3df8d5cd6.zip
upgrade react to 0.14.2, use production build
Diffstat (limited to 'server/sonar-web/gulpfile.js')
-rw-r--r--server/sonar-web/gulpfile.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/sonar-web/gulpfile.js b/server/sonar-web/gulpfile.js
index 6ef301b1fb8..03f2e607b80 100644
--- a/server/sonar-web/gulpfile.js
+++ b/server/sonar-web/gulpfile.js
@@ -4,16 +4,22 @@ var del = require('del');
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);
});
@@ -62,4 +68,4 @@ gulp.task('watch', ['scripts-main-watch', 'scripts-apps-watch', 'scripts-widgets
gutil.log(gutil.colors.bgGreen('Watching for changes...'));
});
-gulp.task('default', ['build']); \ No newline at end of file
+gulp.task('default', ['set-env', 'build']);