aboutsummaryrefslogtreecommitdiffstats
path: root/server
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
parent2b676da5ab6265e66534b735e82fcdfc7f32bb10 (diff)
downloadsonarqube-a98695e8ce839f133cf7a814a53f2bc3df8d5cd6.tar.gz
sonarqube-a98695e8ce839f133cf7a814a53f2bc3df8d5cd6.zip
upgrade react to 0.14.2, use production build
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/gulpfile.js8
-rw-r--r--server/sonar-web/package.json7
2 files changed, 11 insertions, 4 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']);
diff --git a/server/sonar-web/package.json b/server/sonar-web/package.json
index 87a6ac744b1..a19052acaa5 100644
--- a/server/sonar-web/package.json
+++ b/server/sonar-web/package.json
@@ -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",