diff --git a/gulpfile.js b/gulpfile.js index f2c95acc..8eda9fbc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -127,7 +127,7 @@ function bundle(watch) { loadMaps: true }))) // loads map from browserify file .pipe(gulpif(!argv.production, sourcemaps.write())) // writes .map file - .pipe(gulpif(argv.production, uglify())) + .pipe(gulpif(argv.production, uglify({mangle: false}))) .pipe(gulp.dest('./build/js')) .pipe(browserSync.stream()); } diff --git a/package.json b/package.json index e9a830c5..63c58218 100644 --- a/package.json +++ b/package.json @@ -21,16 +21,18 @@ "jest-cli": "^0.4.0" }, "dependencies": { + "alt": "^0.16.5", + "babelify": "^6.1.2", + "bootstrap-sass": "^3.3.4", + "browser-sync": "^2.7.5", + "browserify": "^9.0.8", + "classnames": "^1.2.2", + "compression": "^1.4.4", + "envify": "^3.4.0", + "es6-promise": "^2.1.1", "eslint": "^0.22.1", "eslint-plugin-react": "^2.5.0", - "browser-sync": "^2.7.5", - "watchify": "^3.1.2", - "yargs": "^3.10.0", - "lodash": "^3.9.3", - "react-textarea-autosize": "^2.2.3", - "reactify": "^1.1.0", - "vinyl-buffer": "^1.0.0", - "vinyl-source-stream": "^1.1.0", + "express": "^4.12.4", "gulp": "^3.8.11", "gulp-concat": "^2.5.2", "gulp-eslint": "^0.13.2", @@ -41,22 +43,21 @@ "gulp-sourcemaps": "^1.5.2", "gulp-uglify": "^1.2.0", "gulp-util": "^3.0.4", - "browserify": "^9.0.8", - "envify": "^3.4.0", - "babelify": "^6.1.2", - "bootstrap-sass": "^3.3.4", - "alt": "^0.16.5", - "classnames": "^1.2.2", - "es6-promise": "^2.1.1", - "express": "^4.12.4", "isomorphic-fetch": "^2.0.2", + "lodash": "^3.9.3", "object-assign": "^2.0.0", "react": "^0.13.2", "react-bootstrap": "~0.22.6", "react-datepicker": "~0.8.0", "react-router": "^0.13.3", + "react-textarea-autosize": "^2.2.3", + "reactify": "^1.1.0", "shmui": "^0.1.0", - "uglifyjs": "^2.4.10" + "uglifyjs": "^2.4.10", + "vinyl-buffer": "^1.0.0", + "vinyl-source-stream": "^1.1.0", + "watchify": "^3.1.2", + "yargs": "^3.10.0" }, "jest": { "scriptPreprocessor": "node_modules/babel-jest", diff --git a/server.js b/server.js index 9bf66f0f..2ba6c9e5 100644 --- a/server.js +++ b/server.js @@ -1,6 +1,10 @@ var express = require('express'); +var compression = require('compression') + var app = express(); +app.use(compression()); + app.use('/static/js', express.static(__dirname + '/build/js')); app.use('/static/css', express.static(__dirname + '/build/css')); app.use('/static/fonts', express.static(__dirname + '/build/fonts'));