]> source.dussan.org Git - sonarqube.git/commitdiff
upgrade react to 0.14.2, use production build
authorStas Vilchik <vilchiks@gmail.com>
Mon, 16 Nov 2015 09:06:21 +0000 (10:06 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 16 Nov 2015 09:06:29 +0000 (10:06 +0100)
server/sonar-web/gulpfile.js
server/sonar-web/package.json

index 6ef301b1fb83c549fbbd1158d6564d825c126b78..03f2e607b8020b49a30279e7b9b7a02dd51d853f 100644 (file)
@@ -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']);
index 87a6ac744b1047dda2a54e9ae565cd79024549e2..a19052acaa5148d176f172d2555f940719be927f 100644 (file)
@@ -22,6 +22,7 @@
     "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",
@@ -37,9 +38,9 @@
     "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",