{"bin":{"bundlesize":"index.js","bundlesize-init":"src/init-status.js","bundlesize-pipe":"pipe.js"},"bugs":{"url":"https://github.com/siddharthkp/bundlesize/issues"},"dist":{"shasum":"c93baf6da35d122f5c55511394c9defbe9212714","tarball":"https://registry.npmjs.org/bundlesize/-/bundlesize-1.0.0-beta.1.tgz","fileCount":16,"integrity":"sha512-owK2SJiJsGGBeM7gTy6b9hzipON3mWwGBoeirnmhPeHQZLjgfMv2zbNXOGR82oDVdLN4jmibVVLXKCvD1J9wJg==","signatures":[{"sig":"MEUCIDt7cbfaxge7trxK7eamA5BeZ0RmWD21sdphKdqRjHGEAiEAxpVRfjTls2c/pujS3Am0+q6No/9QSrBPixJD/afYwnU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23477,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdJGlQCRA9TVsSAnZWagAAn6cP+wduvN+n75Gv6d1Z2xxg\ndsVQ1EWudVvRW4AVu8IWdud4irtp9pC/Ck0/qLpePXH+BLOkUTPRsytTLwXN\nmMS6qXGhmTt3T2AzZdKqEMIH5fBx4fjsRx1Ss8+srXI9a7l1wcvwJq/2myjE\n8u3IqZgDdewAc2bQzjQKrCEWUa/DjuDtLBn/wD1bnQ0k1H/54+6EE+jPuKux\nvFpdm+b0IhBMq/vkJykSq5yQ25fAfDzCdH4MR3mp4TfCDfEJm/deAJQSsS7l\nlDh2mVbJhdf/XLbJUWXYcit6ZVU6KBGL3dJV9fhoN8kdGUSuiYm3wqQSH2Al\nU8lK8AtQGls3R5+MY39IpH4BoBEglypEtIiyNl2FCh8lEioW7YkKtDghTLo/\ngU5wlENNmtHsqN3xmrgqMqogfT5HhaYN2htZbeRECWwvxnFnU7h41X1IK8yr\nbzuiCdUkn9s5/xFgS9lTFbhW43YQ+QFTN1BzygNjtYPwbw0sxa/T+x12nLk3\nIoqk28TGcLDGtMfcCc89NyDcv/sQmXDBOTxXfMulnSZbdzdnb+MInqH7g1j5\n/yiwLZlPPP3InapX5bwnFOpzFyNivJ+ciHZFnwdEfkGJdbgX/hsB758OIhOj\nH+c0Lid/rZUVNYOnIw1BVetE/jgp6mgsjk9WjgrS2o3y1JD0eo2PqTlYeyCR\n8jXm\r\n=Y5HB\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":"51b2094c731e91eea1c70dab5ac118933516de5a","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","axios":"^0.19.0","bytes":"^3.1.0","ci-env":"^1.4.0","commander":"^2.20.0","gzip-size":"^4.0.0","prettycli":"^1.4.3","brotli-size":"0.1.0","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","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.1_1562667343806_0.3524148304428698","host":"s3://npm-registry-packages"},"_id":"bundlesize@1.0.0-beta.1","version":"1.0.0-beta.1"}