Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more aggressive about minification #310

Merged
merged 1 commit into from Oct 16, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -29,10 +29,10 @@
"jstransform": "./scripts/jstransform.sh",
"jstransform-watch": "./scripts/jstransform.sh --watch",
"browserify-all": "npm run browserify && npm run browserify-test",
"browserify": "browserify -r .:pileup -v -t [ envify --NODE_ENV production ] --debug -o dist/pileup.js",
"browserify": "browserify -r .:pileup -v -g [ envify --NODE_ENV production ] -g uglifyify --debug -o dist/pileup.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this lead to double uglification (first via uglifyify and then directly via uglify)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes -- though this is actually recommended!

When using uglifyify you should generally also use Uglify, to achieve the smallest output. Uglifyify provides an additional optimization when used with Uglify, but does not provide all of the optimization that using Uglify on its own does, so it's not a replacement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aha, magic 🔮

"watch-dist": "watchify -r .:pileup -v -t [ envify --NODE_ENV development ] --debug -o dist/pileup.js",
"browserify-test": "browserify dist/test/*.js -v --debug -o dist/tests.js",
"exorcist": "cat dist/pileup.js | exorcist dist/pileup.js.map > /dev/null",
"exorcist": "cat dist/pileup.js | exorcist --base . dist/pileup.js.map > /dev/null",
"watch": "./scripts/watch.sh",
"watch-test": "watchify dist/test/*.js -v --debug -o dist/tests.js",
"uglify": "uglifyjs --compress --mangle --in-source-map dist/pileup.js.map --source-map-include-sources --source-map dist/pileup.min.js.map -o dist/pileup.min.js dist/pileup.js",
Expand Down Expand Up @@ -79,8 +79,8 @@
"coveralls": "2.10.x",
"envify": "^3.4.0",
"es5-shim": "^4.1.0",
"flow-bin": "^0.17.0",
"exorcist": "^0.4.0",
"flow-bin": "^0.17.0",
"http-server": "^0.8.0",
"istanbul": "^0.3.17",
"jstransform": "^11.0.2",
Expand All @@ -100,6 +100,7 @@
"source-map": "^0.3.0",
"stats.js": "^1.0.0",
"uglify-js": "^2.4.23",
"uglifyify": "^3.0.1",
"watchify": "^3.2.1"
},
"sniper": {
Expand Down