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

switch to ES6-compatible minifier #1148

Merged
merged 1 commit into from Jun 25, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

switch to ES6-compatible minifier

Some downstream dependencies have introduced ES6 (bencode@1.0.0) and
there are others that have done so too, but which I've refrained from
updating (junk@2.0.0).

It's going to keep getting harder and harder to keep this code out of
the codebase -- so let's use babili, which is a minifier that supports
ES6.

It compresses worse than uglify (I think the bundle is something like
3KB larger now), but it's worth it IMO.
  • Loading branch information
feross committed Jun 23, 2017
commit 779636d588535be0a8ccb6f7ff52c4b2846cb62c
@@ -70,6 +70,7 @@
"zero-fill": "^2.2.3"
},
"devDependencies": {
"babili": "^0.1.4",
"bittorrent-tracker": "^9.0.0",
"brfs": "^1.4.3",
"browserify": "^14.0.0",
@@ -81,7 +82,6 @@
"serve-static": "^1.11.1",
"standard": "*",
"tape": "^4.6.0",
"uglify-js": "^2.7.0",
"webtorrent-fixtures": "^1.5.0",
"zuul": "^3.10.1"
},
@@ -112,7 +112,7 @@
"url": "git://github.com/webtorrent/webtorrent.git"
},
"scripts": {
"build": "browserify -s WebTorrent -e ./ | uglifyjs -c warnings=false -m > webtorrent.min.js",
"build": "browserify -s WebTorrent -e ./ | babili > webtorrent.min.js",
"build-debug": "browserify -s WebTorrent -e ./ > webtorrent.debug.js",
"size": "npm run build && cat webtorrent.min.js | gzip | wc -c",
"test": "standard && node ./bin/test.js",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.