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.