mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 17:33:14 +01:00
Enable compression
This commit is contained in:
parent
54b996db90
commit
c4fee2880f
@ -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());
|
||||
}
|
||||
|
35
package.json
35
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",
|
||||
|
@ -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'));
|
||||
|
Loading…
Reference in New Issue
Block a user