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

Add size-limit #1070

Merged
merged 2 commits into from Jul 4, 2017
Merged

Add size-limit #1070

merged 2 commits into from Jul 4, 2017

Conversation

@ai
Copy link
Contributor

ai commented Jul 2, 2017

size-limit is a tool to show how many kilobytes your JS library increases the user bundle. You can set size budget and size-limit will prevent JavaScript libraries bloat on Travis CI.

It already used in Autoprefixer, PostCSS and JSS. For instance, I reduce Logux Client size 2x because I found some unexpected huge dependencies.

@mweststrate what do you think about this tool?

@coveralls
Copy link

coveralls commented Jul 2, 2017

Coverage Status

Coverage remained the same at 94.949% when pulling 3dc3967 on ai:size-limit into 0d14ee9 on mobxjs:master.

"test-flow": "node_modules/.bin/flow check",
"test-webpack": "node scripts/webpack-regression-tests.js",
"coverage": "npm run quick-build && npm run build-tests && istanbul cover tape test/*.js test/typescript/typescript-tests.js",
"build-tests": "npm run build-typescript-tests && npm run build-babel-tests",
"build-typescript-tests": "tsc -p test/typescript",
"build-babel-tests": "babel test/babel/babel-tests.js -o test/babel-tests.js",
"use-minified": "cp lib/mobx.min.js lib/mobx.js",
"lint": "tslint -c tslint.json src/*.ts src/types/*.ts src/api/*.ts src/core/*.ts src/utils/*.ts"
"lint": "tslint -c tslint.json src/*.ts src/types/*.ts src/api/*.ts src/core/*.ts src/utils/*.ts",
"size": "size-limit 19KB lib/mobx.js"

This comment has been minimized.

@mweststrate

mweststrate Jul 4, 2017 Member

the 19KB is quite arbitrary, why not 20? I assume the goal is to check whether the size is not unexpectedly blown up?

This comment has been minimized.

@ai

ai Jul 4, 2017 Author Contributor

Sure, fixed.

@coveralls
Copy link

coveralls commented Jul 4, 2017

Coverage Status

Coverage remained the same at 94.949% when pulling 19aa176 on ai:size-limit into 0d14ee9 on mobxjs:master.

@mweststrate
Copy link
Member

mweststrate commented Jul 4, 2017

Merged, thanks!

@mweststrate mweststrate merged commit b772f58 into mobxjs:master Jul 4, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 94.949%
Details
mweststrate added a commit that referenced this pull request Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.