{"bin":{"bundlesize":"index.js","bundlesize-init":"src/init-status.js","bundlesize-pipe":"pipe.js"},"bugs":{"url":"https://github.com/siddharthkp/bundlesize/issues"},"dist":{"shasum":"8ad9d396056ff14b4e3c4bee51a34a979cfdf3e2","tarball":"https://registry.npmjs.org/bundlesize/-/bundlesize-1.0.0-beta.2.tgz","fileCount":24,"integrity":"sha512-Drq6wuFzxDlR2/QNIILqhUIqEAL9osD1ZJLc6AtXkS13JA/Tx8lwHB/mHvW2JaBPPFZBnfedqiRfVlxfo3qbyQ==","signatures":[{"sig":"MEQCIFk1/yJOY4Xrr7Dcn5btvKWNfkaBfykO9aTYPqnmlxkyAiA6lEK9tw55Y10g7Eo0yFCXQLOS5xTJqhE33X3XyQ9EfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":28805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJHAnCRA9TVsSAnZWagAAqD8P/1EeJNzZ/2/yesNrD6p+\nh8uHAPpS3EGM9+HBuldYBq/ukTEyMex5MHFRZKY8qD0lX9ynAMvgXoXK/J+c\nxTU/Ld6IuGINgryXxd9Zcn4WVBeDZZXIFOgNTrPWbEHqYGEm96ZgXh/mgcuv\nEFsaYgMUANmPWa8ITADTv5SMVm5rXXXYacxISu2iV+QgXDpbQlwQqavTbZbu\n1AVByqR3lWUN82jXEd5+7h2YWAPGE5JWwRuJlm0YFXn/FpYQBIEUbMIoykg8\nNh4b1yc5JI4EkrEDxRD0mDNGl4MakvdzB9TtWquBP466SAxhmlJ7+cpo9ogt\nUhgDitFe0MjUPWCGq2Pe8hXW1wov8hsVtJeJvfJd2yl/Sbgc6WKQ+9v7gbza\nc5fu5lFU3qC50MufSE4W99T3cr3PtsLZ33g+zTJnrcltobIMF+vOcZEaWLIx\nWdUKBAps1I4pfwl6+x+6/2jR0+GYnf6Sdl5RhSnJoKQIfQon+zs5TXBIdxac\nkTJPkTAg+xHxNKIO9IEUciS1A9Q//WMqZ1UPlYyB/P3hcC9kjD15DevPNp9M\nXJzHN3SeMJLVj3a5yVoN22J4bAXfEe5eaW2SMeKG1yCN+cX3gvq42buHJkbI\nlJpfALUyuvEbqZ2dDi9FWKd8vqW+Bk9iG4XgcJk8LolIwE+Z7XV/fw8R/s1J\nQs/E\r\n=q0qY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","name":"bundlesize","author":{"name":"siddharthkp"},"readme":"<p align=\"center\">\n  <img src=\"https://cdn.rawgit.com/siddharthkp/bundlesize/master/art/logo.png\" height=\"200px\">\n  <br><br>\n  <b>Keep your bundle size in check</b>\n  <br>\n</p>\n\n&nbsp;\n\n[![Build Status](https://travis-ci.org/siddharthkp/bundlesize.svg?branch=master)](https://travis-ci.org/siddharthkp/bundlesize)\n[![NPM Version](https://img.shields.io/npm/v/bundlesize.svg)](https://npmjs.org/package/bundlesize)\n[![NPM Downloads](https://img.shields.io/npm/dm/bundlesize.svg?style=flat)](https://www.npmjs.com/package/bundlesize)\n&nbsp;\n\n#### Setup\n\n```sh\nnpm install bundlesize --save-dev\n\n# or\n\nyarn add bundlesize --dev\n```\n\n&nbsp;\n\n#### Usage\n\n&nbsp;\n\nAdd it to your scripts in `package.json`\n\n```json\n\"scripts\": {\n  \"test\": \"bundlesize\"\n}\n```\n\nOr you can use it with `npx` from [NPM 5.2+](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b).\n\n```sh\nnpx bundlesize\n```\n\n&nbsp;\n\n#### Configuration\n\n&nbsp;\n\n`bundlesize` accepts an array of files to check.\n\n```json\n[\n  {\n    \"path\": \"./build/vendor.js\",\n    \"maxSize\": \"30 kB\"\n  },\n  {\n    \"path\": \"./build/chunk-*.js\",\n    \"maxSize\": \"10 kB\"\n  }\n]\n```\n\n&nbsp;\n\nYou can keep this array either in\n\n1. `package.json`\n\n   ```json\n   {\n     \"name\": \"your cool library\",\n     \"version\": \"1.1.2\",\n     \"bundlesize\": [\n       {\n         \"path\": \"./build/vendor.js\",\n         \"maxSize\": \"3 kB\"\n       }\n     ]\n   }\n   ```\n\n   or in a separate file\n\n2. `bundlesize.config.json`\n\n   Format:\n\n   ```json\n   {\n     \"files\": [\n       {\n         \"path\": \"./dist.js\",\n         \"maxSize\": \"3 kB\"\n       }\n     ]\n   }\n   ```\n\n   You can give a different file by using the `--config` flag:\n\n   ```\n   bundlesize --config configs/bundlesize.json\n   ```\n\n&nbsp;\n\n#### Customisation\n\n&nbsp;\n\n1. Fuzzy matching\n\n   If the names of your build files are not predictable, you can use the [glob pattern](https://github.com/isaacs/node-glob) to specify files.\n\n   This is common if you append a hash to the name or use a tool like create-react-app/nextjs.\n\n   ```json\n   {\n     \"files\": [\n       {\n         \"path\": \"build/**/main-*.js\",\n         \"maxSize\": \"5 kB\"\n       },\n       {\n         \"path\": \"build/**/*.chunk.js\",\n         \"maxSize\": \"50 kB\"\n       }\n     ]\n   }\n   ```\n\n   It will match multiple files if necessary and create a new row for each file.\n\n   &nbsp;\n\n2. Compression options\n\n   By default, bundlesize `gzips` your build files before comparing.\n\n   If you are using `brotli` instead of gzip, you can specify that with each file:\n\n   ```json\n   {\n     \"files\": [\n       {\n         \"path\": \"./build/vendor.js\",\n         \"maxSize\": \"5 kB\",\n         \"compression\": \"brotli\"\n       }\n     ]\n   }\n   ```\n\n   If you do not use any compression before sending your files to the client, you can switch compression off:\n\n   ```json\n   {\n     \"files\": [\n       {\n         \"path\": \"./build/vendor.js\",\n         \"maxSize\": \"5 kB\",\n         \"compression\": \"none\"\n       }\n     ]\n   }\n   ```\n\n&nbsp;\n\n#### Build status for GitHub\n\n&nbsp;\n\nIf your repository is hosted on GitHub, you can set bundlesize up to create a \"check\" on every pull request.\n\n![build status](https://cdn.rawgit.com/siddharthkp/bundlesize/master/art/status.png)\n\nCurrently works with [Travis CI](https://travis-ci.org), [CircleCI](https://circleci.com/), [Wercker](http://www.wercker.com), and [Drone](http://readme.drone.io/).\n\n- [Authorize `bundlesize` for status access](https://github.com/login/oauth/authorize?scope=repo%3Astatus&client_id=6756cb03a8d6528aca5a), copy the token provided.\n- Add this token as `BUNDLESIZE_GITHUB_TOKEN` as environment parameter in your CIs project settings.\n\nUsing a different CI? You will need to supply an additional 4 environment variables.\n\n- `CI_REPO_OWNER` given the repo `https://github.com/myusername/myrepo` would be `myusername`\n- `CI_REPO_NAME` given the repo `https://github.com/myusername/myrepo` would be `myrepo`\n- `CI_COMMIT_MESSAGE` the commit message\n- `CI_COMMIT_SHA` the SHA of the CI commit, in [Jenkins](https://jenkins.io/) you would use `${env.GIT_COMMIT}`\n\n(Ask me for help if you're stuck)\n\n&nbsp;\n\n#### Usage with CLI\n\n&nbsp;\n\nbundlesize can also be used without creating a configuration file. We do not recommend this approach and it might be deprecated in a future version.\n\n```sh\nbundlesize -f \"dist/*.js\" -s 20kB\n```\n\nFor more granular configuration, we recommend configuring it in the `package.json` (documented above).\n\n&nbsp;\n\n#### like it?\n\n:star: this repo\n\n&nbsp;\n\n#### how to contribute?\n\n- [CONTRIBUTING.md](CONTRIBUTING.md)\n\n&nbsp;\n\n#### Featured on [Totally tooling tips](https://www.youtube.com/watch?v=Da6VxdGU2Ig) and [Chrome Dev Summit](https://www.youtube.com/watch?v=_srJ7eHS3IM)!!\n\n<a href=\"https://www.youtube.com/watch?v=Da6VxdGU2Ig\">\n  <img height=\"200px\" src=\"https://i.ytimg.com/vi/Da6VxdGU2Ig/hqdefault.jpg?sqp=-oaymwEXCNACELwBSFryq4qpAwkIARUAAIhCGAE=&rs=AOn4CLAAfWzQIMvjH0TIzkAhi-114DIHPQ\"/>\n</a>\n<a href=\"https://www.youtube.com/watch?v=_srJ7eHS3IM\">\n  <img height=\"200px\" src=\"https://cdn.rawgit.com/siddharthkp/bundlesize/master/art/chromedevsummit.png\"/>\n</a>\n\n&nbsp;\n\n#### who uses bundlesize?\n\n- [bootstrap](https://github.com/twbs/bootstrap)\n- [preact](https://github.com/developit/preact)\n- [lighthouse](https://github.com/GoogleChrome/lighthouse)\n- [styled-components](https://github.com/styled-components/styled-components)\n- [emotion](https://github.com/tkh44/emotion)\n- [glamorous](https://github.com/paypal/glamorous)\n- [Popper.js](https://github.com/FezVrasta/popper.js)\n- [react-apollo](https://github.com/apollographql/react-apollo)\n- [hyperapp](https://github.com/hyperapp/hyperapp)\n- [css-constructor](https://github.com/siddharthkp/css-constructor)\n- [redux-saga](https://github.com/redux-saga/redux-saga)\n- [micromodal](https://github.com/ghosh/micromodal)\n- [unistore](https://github.com/developit/unistore)\n\n&nbsp;\n\n#### TODO\n\n- Work with other CI tools\n  - [AppVeyor](https://www.appveyor.com/) ([#234](https://github.com/siddharthkp/bundlesize/issues/234))\n- Automate setup (setting env_var)\n\n&nbsp;\n\n#### similar projects\n\n- [BuildSize](https://buildsize.org/) - GitHub App, no manual configuration required\n- [travis-weigh-in](https://github.com/danvk/travis-weigh-in) - Uses Python rather than Node.js\n- [size-limit](https://github.com/ai/size-limit) - Uses webpack, builds your files for you.\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md).\n<a href=\"graphs/contributors\"><img src=\"https://opencollective.com/bundlesize/contributors.svg?width=890\" /></a>\n\n#### license\n\nMIT © [siddharthkp](https://github.com/siddharthkp)\n","gitHead":"086bbd8f8fb46dab3a21f6044ca9758daf74f31a","license":"MIT","scripts":{"t":"yarn test","test":"ava -v tests/index.js","release":"npm publish --tag beta","test:old":"npm run test:default && npm run test:no-compression && npm run test:brotli-compression","precommit":"lint-staged","test:default":"node index && cat pipe.js | node pipe --name pipe.js --max-size 1kB","test:no-compression":"cat pipe.js | node pipe --compression none --name pipe.js","test:brotli-compression":"cat pipe.js | node pipe --compression brotli --name pipe.js"},"_npmUser":{"name":"siddharthkp","email":"siddharth.kshetrapal@gmail.com"},"homepage":"https://github.com/siddharthkp/bundlesize#readme","keywords":["library","size","check","build","maxSize"],"collective":{"url":"https://opencollective.com/bundlesize","logo":"https://opencollective.com/opencollective/logo.txt","type":"opencollective"},"repository":{"url":"git+https://github.com/siddharthkp/bundlesize.git","type":"git"},"_npmVersion":"6.9.0","description":"Keep your library size in check","directories":{},"lint-staged":{"*.js":["prettier","git add"]},"maintainers":[{"name":"saravieira","email":"hey@iamsaravieira.com"},{"name":"siddharthkp","email":"siddharth.kshetrapal@gmail.com"}],"_nodeVersion":"10.16.0","dependencies":{"glob":"^7.1.4","plur":"^3.1.1","axios":"^0.19.0","bytes":"^3.1.0","ci-env":"^1.4.0","figures":"^3.0.0","commander":"^2.20.0","gzip-size":"^4.0.0","prettycli":"^1.4.3","right-pad":"^1.0.1","cosmiconfig":"^5.2.1","github-build":"^1.2.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"ava":"^2.1.0","execa":"^2.0.1","husky":"^0.14.3","prettier":"^1.6.0","babel-cli":"^7.0.0-beta.3","babel-core":"^7.0.0-bridge.0","lint-staged":"^7.1.1","babel-traverse":"^7.0.0-beta.3","babel-preset-es2015":"^7.0.0-beta.3","babel-preset-stage-3":"^7.0.0-beta.3","bundlesize-plugin-brotli":"^1.0.0","babel-plugin-transform-typescript":"7.0.0-alpha.19","babel-plugin-transform-regenerator":"7.0.0-alpha.19","babel-plugin-syntax-async-functions":"7.0.0-alpha.19","babel-plugin-transform-flow-strip-types":"7.0.0-alpha.19"},"_npmOperationalInternal":{"tmp":"tmp/bundlesize_1.0.0-beta.2_1562669094989_0.5466766916654122","host":"s3://npm-registry-packages"},"_id":"bundlesize@1.0.0-beta.2","version":"1.0.0-beta.2"}