https://github.com/kuldeepkeshwar/size-plugin-bot
A Github bot for size-plugin
https://github.com/kuldeepkeshwar/size-plugin-bot
bot bundlesize github-bot performance performance-budget probot-app rollup size-plugin webpack webpack-assets webpack-plugin
Last synced: 5 months ago
JSON representation
A Github bot for size-plugin
- Host: GitHub
- URL: https://github.com/kuldeepkeshwar/size-plugin-bot
- Owner: kuldeepkeshwar
- License: mit
- Created: 2019-06-20T11:33:57.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T02:13:22.000Z (over 1 year ago)
- Last Synced: 2025-01-03T00:05:53.604Z (about 1 year ago)
- Topics: bot, bundlesize, github-bot, performance, performance-budget, probot-app, rollup, size-plugin, webpack, webpack-assets, webpack-plugin
- Language: JavaScript
- Homepage: https://github.com/apps/size-plugin
- Size: 1.34 MB
- Stars: 84
- Watchers: 2
- Forks: 9
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-list - size-plugin-bot - plugin | kuldeepkeshwar | 75 | (JavaScript)
README
[](#contributors)
size-plugin
> A GitHub 🤖 built with Probot that helps you to keep an 👁️ on static asset 📦 sizes of your application and gives instant feedback 📝 for developer whenever they make change.
##### 🤖 comments the gzipped sizes of your webpack assets and the changes since the last build into the relevant PR
## Usage
First add an instance of the [size-plugin](https://github.com/GoogleChromeLabs/size-plugin) to your webpack configuration:
> using rollup ? use [rollup-plugin-size](https://github.com/luwes/rollup-plugin-size)
```diff
// webpack.config.js
+ const SizePlugin = require('size-plugin');
module.exports = {
plugins: [
+ new SizePlugin({publish:true})
]
}
```
Second Simply [install the app](https://github.com/apps/size-plugin) and make some changes, open a pr and watch the magic happen 😊
Currently works with [Travis CI](https://travis-ci.org), [CircleCI](https://circleci.com/), [Wercker](http://www.wercker.com), and [Drone](http://readme.drone.io/).
Using a different CI? Under the hood, [size-plugin](https://github.com/GoogleChromeLabs/size-plugin) uses [ci-env](https://github.com/siddharthkp/ci-env) to extract meta information which works perfectly with Custom CI 🙃
## Configure Bot
Create a file `.github/size-plugin.yml`.
example 👇
```yml
base-branches: # base branches against which bot can open a pull request.
- master
- next
size-files: # list(string/object) of size*.json files
## In case of multiple builds.
- sizes-browser.json
- sizes-server.json
## In case of multiple packages in a single repo or mono repo
- dir: packages/a
filename: sizes-a.json
- dir: packages/b
filename: sizes-b.json
- dir: packages/c
filename: sizes-c-browser.json
- dir: packages/c
filename: sizes-c-server.json
```
> Note: `filename` must be unique
## Contributing
If you have suggestions for how size-plugin could be improved, or want to report a bug, open an issue! We'd love all and any contributions.
For more, check out the [Contributing Guide](CONTRIBUTING.md).
#### like it?
⭐️ this repo
## License
[ISC](LICENSE) © 2019 kuldeepkeshwar
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!