Skip to content

Latest commit

 

History

History
102 lines (59 loc) · 4.5 KB

CONTRIBUTING.md

File metadata and controls

102 lines (59 loc) · 4.5 KB

Hi! Thanks for giving this a read!

Super exciting to see your contribution!

 

Can I implement feature X?

  1. Before writing the code for your feature, please create an issue here.

  2. Sometimes, the feature you have in mind might already exist! or might not fit well in the tool.

  3. It breaks my heart to say no to a pull request. So, please let's talk about it first on an issue!

 

How do I contribute code?

  1. Fork this repo on github.

  2. Clone it on your machine: git clone https://github.com/YOUR_USERNAME/bundlesize.git

  3. Run npm install (bundlesize uses npm5 with a package-lock.json, please don't use yarn, sorry)

  4. Run npm test to ensure the repository is setup correctly. You should see a dummy output:

PASS  ./index.js: 189B < maxSize 600B gzip 
  1. Make your changes.

  2. Make sure that the tests still pass: npm test

  3. Submit a pull request to the original bundlesize repository through GitHub.

  4. Choose a nice title and describe the changes you have made.

  5. Do a little dance!

 

Structure

  • 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 router
  • store/github.js Exchanges code for auth token
  • store/firebase.js Fetches and updates values from firebase

Doubts?

Feel free to open an issue or reach out to me on twitter.

Financial contributions

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.

Credits

Contributors

Thank you to all the people who have already contributed to bundlesize!

Backers

Thank you to all our backers! [Become a backer]

Sponsors

Thank you to all our sponsors! (please ask your company to also support this open source project by becoming a sponsor)