Hi! Thanks for giving this a read!
Super exciting to see your contribution!
-
Before writing the code for your feature, please create an issue here.
-
Sometimes, the feature you have in mind might already exist! or might not fit well in the tool.
-
It breaks my heart to say no to a pull request. So, please let's talk about it first on an issue!
-
Fork this repo on github.
-
Clone it on your machine:
git clone https://github.com/YOUR_USERNAME/bundlesize.git
-
Run
npm install
(bundlesize uses npm5 with apackage-lock.json
, please don't use yarn, sorry) -
Run
npm test
to ensure the repository is setup correctly. You should see a dummy output:
PASS ./index.js: 189B < maxSize 600B gzip
-
Make your changes.
-
Make sure that the tests still pass:
npm test
-
Submit a pull request to the original bundlesize repository through GitHub.
-
Choose a nice title and describe the changes you have made.
-
Do a little dance!
-
index.js
This is the root file -
src/config.js
Reads bundlesize settings from package.json -
src/files.js
Fetches files and their size based on the config -
src/reporter.js
Compares with threshold and prints output/message -
src/build.js
Handles CI builds -
src/token.js
Holds token information -
src/api.js
Fetches (for comparison) and updates numbers for master from the API layer
API is hosted on zeit/now.
store/index.js
API routerstore/github.js
Exchanges code for auth tokenstore/firebase.js
Fetches and updates values from firebase
Feel free to open an issue or reach out to me on twitter.
We also welcome financial contributions in full transparency on our open collective. Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
Thank you to all the people who have already contributed to bundlesize!
Thank you to all our backers! [Become a backer]
Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)