{"_id":"@alexseitsinger/webpack-bundle-tracker","_rev":"1-da7080c8db8c89bcf316434e6cf99885","name":"@alexseitsinger/webpack-bundle-tracker","dist-tags":{"latest":"0.6.0"},"versions":{"0.6.0":{"name":"@alexseitsinger/webpack-bundle-tracker","version":"0.6.0","description":"Spits out some stats about webpack compilation process to a file","keywords":["bundle","files","plugin","stats","webpack"],"homepage":"https://github.com/alexseitsinger/webpack-bundle-tracker","bugs":{"url":"https://github.com/alexseitsinger/webpack-bundle-tracker/issues"},"repository":{"type":"git","url":"https://github.com/alexseitsinger/webpack-bundle-tracker.git"},"license":"MIT","author":{"name":"Alex Seitsinger"},"main":"lib/index.js","types":"lib/index.d.ts","scripts":{"pretty":"prettier --loglevel warn --write lib/*.js tests/*.js","pretty-lint":"prettier --check lib/*.js tests/*.js","pretest":"yarn pretty-lint","test":"jest --runInBand --env node","posttest":"tsc","test-watch":"jest --runInBand --env node --watchAll","travis":"yarn pretest && jest --runInBand --coverage --env node && codecov && yarn posttest"},"jest":{"setupFilesAfterEnv":["jest-extended"]},"dependencies":{"deep-extend":"^0.6.0","mkdirp":"^0.5.1","strip-ansi":"^5.2.0"},"devDependencies":{"@types/deep-extend":"^0.4.31","@types/mkdirp":"^0.5.2","@types/node":"^12.6.9","@types/webpack":"^4.32.1","@typescript-eslint/eslint-plugin":"^1.13.0","@typescript-eslint/parser":"^1.13.0","codecov":"^3.5.0","commitizen":"^4.0.3","cz-conventional-changelog":"^3.0.2","eslint":"^6.1.0","jest":"^24.8.0","jest-extended":"^0.11.2","prettier":"^1.18.2","standard-version":"^7.0.0","typescript":"^3.5.3"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) 2015 Owais Lone\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n","_id":"@alexseitsinger/webpack-bundle-tracker@0.6.0","dist":{"shasum":"ded387694a3cac1c0305750a589e0c5c3f2c56ac","integrity":"sha512-ePtBGniHlKbXCOruuujyFbGeBgiWusBDKml0nDyCvwpdsBIhABVYA+f2DeUrD0PUz0MOy50hiUlP53LjyPGeDQ==","tarball":"https://registry.npmjs.org/@alexseitsinger/webpack-bundle-tracker/-/webpack-bundle-tracker-0.6.0.tgz","fileCount":23,"unpackedSize":24448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxKndCRA9TVsSAnZWagAArzgP/Avbwg99/NU/BEC82X5d\ncFPQy0UjmfcUrdpnGSQIqXC6zsQFQ2hcIfp1BPhuQCCVpNRqJ5BciR6p7+hD\n8yQJF07HlckjfkQftgeoSeR0Nxq7zXh5EJ3VySSLRYr5iH3Q6fROeKLTg12+\nEq3i7ozvGRYXiMu7O6/yGMVW5cpR+cMin4CZpkGx4qp6StJ1S7UiBt1VAJF/\n+mDWQnBtU97srSiKxIOTowBnsbg0YJpMo1EXmwrxHJPGAAWlIoqNjtIgvJ2Q\npipKrRhDhg+PqFVrSvdJVe8PnBHBXDLGHkDYrwXAY7HCnOOaQOFGFlDy8YPw\nL17Ni4/O7WOTraXNFO1gqWEDRsPVtl1bvAU+odufUquOtpgIu6Q0ZQfOgY8w\nej+K/VFlrEKVqXulDy7uqE4sxm2Y8mwp7iFcveBe606L67zwAnikkFWjycmJ\nur5Yq3iMDDtZprWtiDN39yFCgLox/rTCxZ9b6usFedBGY5egdTkw9KeA7iEL\nQdo70KI3dknCZf/7p0hzuoNTFp+zPTVLdFs0fK5y7pWUjsM2HY6KhV3hfXym\nRaP6jJqxE69AgCNwn/gNXneu3tetObJB1UABwvKRPx4BYgTyIf7Ca4A9Kb74\nI5KkpOMm6e4vw3KtxBBZwBy+xO4tDgWPCoT1VWA/ERg1J75M4gq/Za31T19C\nPWOh\r\n=WhpF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBVmvZPQHub4h9Ou0yBT3nnkbxiNWfC8a1CdLSHlPQzFAiEA+KIrxvH7gus0jh1ja6XmYXsf7RHqAmnS+MBQYh5yk24="}]},"maintainers":[{"name":"alexseitsinger","email":"alexseitsinger@gmail.com"}],"_npmUser":{"name":"alexseitsinger","email":"alexseitsinger@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpack-bundle-tracker_0.6.0_1573169629419_0.2133060060160359"},"_hasShrinkwrap":false}},"time":{"created":"2019-11-07T23:33:49.155Z","0.6.0":"2019-11-07T23:33:49.534Z","modified":"2022-04-04T12:41:42.975Z"},"maintainers":[{"name":"alexseitsinger","email":"alexseitsinger@gmail.com"}],"description":"Spits out some stats about webpack compilation process to a file","homepage":"https://github.com/alexseitsinger/webpack-bundle-tracker","keywords":["bundle","files","plugin","stats","webpack"],"repository":{"type":"git","url":"https://github.com/alexseitsinger/webpack-bundle-tracker.git"},"author":{"name":"Alex Seitsinger"},"bugs":{"url":"https://github.com/alexseitsinger/webpack-bundle-tracker/issues"},"license":"MIT","readme":"# Webpack Bundle Tracker [![Join the chat at https://gitter.im/owais/webpack-bundle-tracker](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/owais/webpack-bundle-tracker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)\n\nSpits out some stats about webpack compilation process to a file.\n\n<br>\n\n## Install\n\n```bash\nnpm install --save-dev webpack-bundle-tracker\n```\n\n```bash\nyarn add --dev webpack-bundle-tracker\n```\n\n<br>\n\n## Usage\n\n```javascript\nvar BundleTracker = require(\"webpack-bundle-tracker\");\nmodule.exports = {\n\tcontext: __dirname,\n\tentry: {\n\t\tapp: [\"./app\"]\n\t},\n\n\toutput: {\n\t\tpath: require(\"path\").resolve(\"./assets/bundles/\"),\n\t\tfilename: \"[name]-[hash].js\",\n\t\tpublicPath: \"http://localhost:3000/assets/bundles/\"\n\t},\n\n\tplugins: [\n\t\tnew BundleTracker({\n\t\t\tpath: __dirname,\n\t\t\tfilename: \"./assets/webpack-stats.json\"\n\t\t})\n\t]\n};\n```\n\n`./assets/webpack-stats.json` will look like,\n\n```json\n{\n\t\"status\": \"done\",\n\t\"chunks\": {\n\t\t\"app\": [\n\t\t\t{\n\t\t\t\t\"name\": \"app-0828904584990b611fb8.js\",\n\t\t\t\t\"publicPath\": \"http://localhost:3000/assets/bundles/app-0828904584990b611fb8.js\",\n\t\t\t\t\"path\": \"/home/user/project-root/assets/bundles/app-0828904584990b611fb8.js\"\n\t\t\t}\n\t\t]\n\t}\n}\n```\n\nIn case webpack is still compiling, it'll look like,\n\n```json\n{\n\t\"status\": \"compiling\"\n}\n```\n\nAnd errors will look like,\n\n```json\n{\n\t\"status\": \"error\",\n\t\"file\": \"/path/to/file/that/caused/the/error\",\n\t\"error\": \"ErrorName\",\n\t\"message\": \"ErrorMessage\"\n}\n```\n\n`ErrorMessage` shows the line and column that caused the error.\n\nAnd in case `logTime` option is set to `true`, the output will look like,\n\n```\n{\n  \"status\":\"done\",\n  \"chunks\":{\n   \"app\":[{\n      \"name\":\"app-0828904584990b611fb8.js\",\n      \"publicPath\":\"http://localhost:3000/assets/bundles/app-0828904584990b611fb8.js\",\n      \"path\":\"/home/user/project-root/assets/bundles/app-0828904584990b611fb8.js\"\n    }]\n  },\n  \"startTime\":1440535322138,\n  \"endTime\":1440535326804\n}\n```\n\nBy default, the output JSON will not be indented. To increase readability, you can use the `indent`\noption to make the output legible. By default it is off. The value that is set here will be directly\npassed to the `space` parameter in `JSON.stringify`. More information can be found [here](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify)\n\n\n<br>\n\n## Options\n\n| Name         | Type        | Default                | Description                                                              |\n| ------------ | ----------- | ---------------------- | ------------------------------------------------------------------------ |\n| `path`       | `{String}`  | `'.'`                  | Output directory of bundle tracker JSON file .                           |\n| `filename`   | `{String}`  | `'webpack-stats.json'` | Name of the bundle tracker JSON file.                                    |\n| `publicPath` | `{String}`  | `?`                    | Override `output.publicPath` from Webpack config.                        |\n| `logTime`    | `{Boolean}` | `false`                | Output `startTime` and `endTime` properties in bundle tracker JSON file. |\n","readmeFilename":"README.md"}