Merge pull request #79 from pdehaan/issue-78

Optimize/minimize bundle.js for production
This commit is contained in:
Danny Coates 2017-06-22 11:46:53 -07:00 committed by GitHub
commit 84d1267417
2 changed files with 25 additions and 13 deletions

29
package-lock.json generated
View File

@ -533,8 +533,7 @@
"commander": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz",
"integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=",
"dev": true
"integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q="
},
"concat-map": {
"version": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@ -2103,8 +2102,7 @@
"graceful-readlink": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz",
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=",
"dev": true
"integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU="
},
"growl": {
"version": "1.9.2",
@ -3162,10 +3160,6 @@
"version": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.1.tgz",
"integrity": "sha1-yKuMkiO6NIiKpkopeyiFO+wY2lY="
},
"path": {
"version": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
"integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8="
},
"path-browserify": {
"version": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz",
"integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=",
@ -3335,7 +3329,8 @@
},
"process": {
"version": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
"integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
"dev": true
},
"process-nextick-args": {
"version": "1.0.7",
@ -4183,6 +4178,18 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
"uglify-es": {
"version": "3.0.19",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.0.19.tgz",
"integrity": "sha512-d6ed8hkMCAIWdC+Nl3ihQo/eiX8cMNTbUAC2AEF0vlLTHIR3yAY6tdDoRRL4GuZ/jWQ7JVPK+uSp5XWRL3AVcw==",
"dependencies": {
"source-map": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz",
"integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI="
}
}
},
"uglify-js": {
"version": "2.8.28",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.28.tgz",
@ -4235,11 +4242,13 @@
"util": {
"version": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
"integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
"dev": true,
"dependencies": {
"inherits": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE="
"integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
"dev": true
}
}
},

View File

@ -17,7 +17,8 @@
"jquery": "^3.2.1",
"mozlog": "^2.1.1",
"node-fetch": "^1.7.1",
"redis": "^2.7.1"
"redis": "^2.7.1",
"uglify-es": "3.0.19"
},
"devDependencies": {
"browserify": "^14.4.0",
@ -42,12 +43,14 @@
"license": "MPL-2.0",
"repository": "mozilla/something-awesome",
"scripts": {
"dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server.js",
"bundle": "browserify frontend/src/main.js | uglifyjs > public/bundle.js",
"dev": "watchify frontend/src/main.js -o public/bundle.js -d | node server/portal_server",
"format": "prettier 'frontend/src/*.js' 'public/*.css' 'server/*.js' 'test/*.js' --single-quote --write",
"lint": "npm-run-all lint:*",
"lint:css": "stylelint 'public/*.css'",
"lint:js": "eslint .",
"start": "browserify frontend/src/main.js -o public/bundle.js -d | cross-env NODE_ENV=production node server/portal_server.js",
"prestart": "npm run bundle",
"start": "cross-env NODE_ENV=production node server/portal_server",
"test": "mocha"
}
}