Skip to content

Github action for computing javascript bundle size. It calculates & logs JavaScript bundle size on each pull request or commit (customisable).

License

Notifications You must be signed in to change notification settings

AkshaySharma-BharatPe/JSBundleSize

 
 

Repository files navigation

JS bundle size

Github action for computing javascript bundle size. It calculates & logs JavaScript code bundled size on each pull request or commit (customizable). With the help of this action, developers can now log & check the overall code size after compression on per commit basis & take necessary actions.

Upcoming features: Fail check if bundle size exceeds a specific value.

Stay tuned for more updates!

How to use JSBundle Size action

github actions bot comment bundle size

Usage:

Checkout action.yml

Please check the below code for detailed usage:

steps:
      - uses: actions/checkout@master
      - uses: sarthak-saxena/JSBundleSize@master
        with:
          bootstrap: <Command for installing dependencies ex npm install>
          build_command: <Command to build/bundle code>
          dist_path: <Output path for your bundle>
          token: ${{ secrets.GITHUB_TOKEN }}

By default github actions work on node 12.For a specific node version use:

- uses: actions/setup-node@v1
        with:
          node-version: '10.0.0'

Ex:

steps:
      - uses: actions/checkout@master
      - uses: actions/setup-node@v1
        with:
          node-version: '10.0.0'
      - uses: sarthak-saxena/JSBundleSize@master
        with:
          bootstrap: npm install
          build_command: npm run build
          dist_path: 'dist'
          token: ${{ secrets.GITHUB_TOKEN }}

Also check Demo.yml for complete configuration(on using github actions)

License

The scripts and documentation in this project are released under the MIT License

About

Github action for computing javascript bundle size. It calculates & logs JavaScript bundle size on each pull request or commit (customisable).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%