{"name":"webpackbar","version":"7.0.0","description":"Elegant ProgressBar and Profiler for Webpack and Rspack","repository":{"type":"git","url":"git+https://github.com/unjs/webpackbar.git"},"license":"MIT","type":"module","exports":{".":{"import":{"types":"./dist/webpack.d.mts","default":"./dist/webpack.mjs"},"require":{"types":"./dist/webpack.d.cts","default":"./dist/webpack.cjs"}},"./rspack":{"import":{"types":"./dist/rspack.d.mts","default":"./dist/rspack.mjs"},"require":{"types":"./dist/rspack.d.cts","default":"./dist/rspack.cjs"}}},"main":"./dist/webpack.cjs","types":"./dist/webpack.d.cts","scripts":{"build":"unbuild","lint":"eslint . && prettier -c .","lint:fix":"eslint --fix . && prettier -w .","prepack":"unbuild","play":"webpack --config ./playground/webpack.config.mjs","play:rspack":"rspack --config ./playground/rspack.config.mjs","release":"pnpm test && changelogen --release && npm publish && git push --follow-tags","test":"pnpm lint && vitest run"},"dependencies":{"ansis":"^3.2.0","consola":"^3.2.3","pretty-time":"^1.1.0","std-env":"^3.7.0"},"devDependencies":{"@babel/standalone":"^7.26.2","@rspack/cli":"^1.0.14","@rspack/core":"^1.0.14","@types/node":"^22.9.0","automd":"^0.3.12","chalk":"^5.3.0","changelogen":"^0.5.7","eslint":"^9.14.0","eslint-config-unjs":"^0.4.1","figures":"^6.1.0","jiti":"^2.4.0","markdown-table":"^3.0.4","memory-fs":"^0.5.0","prettier":"^3.3.3","typescript":"^5.6.3","unbuild":"^2.0.0","vitest":"^2.1.4","webpack":"^5.96.1","webpack-cli":"^5.1.4","wrap-ansi":"^9.0.0"},"peerDependencies":{"webpack":"3 || 4 || 5","@rspack/core":"*"},"peerDependenciesMeta":{"webpack":{"optional":true},"@rspack/core":{"optional":true}},"packageManager":"pnpm@9.12.3","engines":{"node":">=14.21.3"},"_id":"webpackbar@7.0.0","gitHead":"9d1c6ebaf07ad71aead3ff32c2d587ae60eaee52","bugs":{"url":"https://github.com/unjs/webpackbar/issues"},"homepage":"https://github.com/unjs/webpackbar#readme","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-aS9soqSO2iCHgqHoCrj4LbfGQUboDCYJPSFOAchEK+9psIjNrfSWW4Y0YEz67MKURNvMmfo0ycOg9d/+OOf9/Q==","shasum":"7228d32881af2392381b6514499ddea73cdf218a","tarball":"http://registry-npm.ywwl.com/webpackbar/download/webpackbar-7.0.0.tgz","fileCount":18,"unpackedSize":165172,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDljsXI52MMu7rxvVrRYGhdh4mEhv1ZJohud+0KLQwSgQIgNXv60kopMG1Xwi6fVUkKHAS9i9rTw6IivPIN9R3Ou6o="}],"size":43448,"noattachment":false,"key":"/webpackbar/-/webpackbar-7.0.0.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"atinux","email":"atinux@gmail.com"},{"name":"pi0","email":"pyapar@gmail.com"},{"name":"clarkdo","email":"clark.duxin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/webpackbar_7.0.0_1730902097385_0.15921227650461156"},"_hasShrinkwrap":false,"readme":"<!-- automd:badges packagephobia -->\n\n[![npm version](https://img.shields.io/npm/v/webpackbar)](https://npmjs.com/package/webpackbar)\n[![npm downloads](https://img.shields.io/npm/dm/webpackbar)](https://npm.chart.dev/webpackbar)\n\n<!-- /automd -->\n\n<div align=\"center\">\n  <!-- replace with accurate logo e.g from https://worldvectorlogo.com/ -->\n  <img width=\"200\" height=\"200\" hspace=\"25\"  src=\"./assets/logo.svg\">\n  <a href=\"https://webpack.js.org/\">\n    <img width=\"200\" height=\"200\" hspace=\"25\" src=\"https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon-square-big.svg\">\n  </a>\n  <p>Elegant ProgressBar and Profiler for [Webpack](https://webpack.js.org/) and [Rspack](https://rspack.dev/). </p>\n</div>\n\n✔ Display elegant progress bar while building or watch\n\n✔ Support of multiple concurrent builds (useful for SSR)\n\n✔ Pretty print filename and loaders\n\n✔ Windows compatible\n\n✔ Fully customizable using reporters\n\n✔ Advanced build profiler\n\n<div align=\"center\">\n<br>\n<img src=\"./assets/screen1.png\" width=\"600px\">\n<p>Multi progress bars</p>\n<br>\n</div>\n\n<div align=\"center\">\n<br>\n<img src=\"./assets/screen2.png\" width=\"600px\">\n<p>Build Profiler</p>\n<br>\n</div>\n\n<h2 align=\"center\">Getting Started</h2>\n\nTo begin, you'll need to install `webpackbar`:\n\n<!-- automd:pm-i -->\n\n```sh\n# ✨ Auto-detect\nnpx nypm install webpackbar\n\n# npm\nnpm install webpackbar\n\n# yarn\nyarn add webpackbar\n\n# pnpm\npnpm install webpackbar\n\n# bun\nbun install webpackbar\n\n# deno\ndeno install webpackbar\n```\n\n<!-- /automd -->\n\nThen add the reporter as a plugin to your webpack config (make sure `webpack` peer dependency is installed).\n\n**`webpack.config.mjs`**\n\n```js\nimport WebpackBar from \"webpackbar\";\n\nexport default {\n  entry: \"./src/entry.js\",\n  plugins: [\n    new WebpackBar({\n      /* options */\n    }),\n  ],\n};\n```\n\nFor using with [Rspack](https://rspack.dev/), you can use `webpackbar/rspack` (make sure `@rspack/core` peer dependency is installed).\n\n**`rspack.config.mjs`**:\n\n```js\nimport WebpackBar from \"webpackbar/rspack\";\n\nexport default {\n  entry: \"./src/entry.js\",\n  plugins: [\n    new WebpackBar({\n      /* options */\n    }),\n  ],\n};\n```\n\n<h2 align=\"center\">Options</h2>\n\n### `name`\n\n- Default: `webpack`\n\nName.\n\n### `color`\n\n- Default: `green`\n\nPrimary color (can be HEX like `#xxyyzz` or a web color like `green`).\n\n### `profile`\n\n- Default: `false`\n\nEnable profiler.\n\n### `fancy`\n\n- Default: `true` when not in CI or testing mode.\n\nEnable bars reporter.\n\n### `basic`\n\n- Default: `true` when running in minimal environments.\n\nEnable a simple log reporter (only start and end).\n\n### `reporter`\n\nRegister a custom reporter.\n\n### `reporters`\n\n- Default: `[]`\n\nRegister an Array of your custom reporters. (Same as `reporter` but array)\n\n<h2 align=\"center\">Custom Reporters</h2>\n\nWebpackbar comes with a fancy progress-bar out of the box.\nBut you may want to show progress somewhere else or provide your own.\n\nFor this purpose, you can provide one or more extra reporters using `reporter` and `reporters` options.\n\n**NOTE:** If you plan to provide your own reporter, don't forget to setting `fancy` and `basic` options to false to prevent conflicts.\n\nA reporter should be instance of a class or plain object and functions for special hooks. It is not necessary to implement all functions, webpackbar only calls those that exists.\n\n**Simple logger:**\n\n```js\nconst logger = {\n  start(context) {\n    // Called when (re)compile is started\n  },\n  change(context) {\n    // Called when a file changed on watch mode\n  },\n  update(context) {\n    // Called after each progress update\n  },\n  done(context) {\n    // Called when compile finished\n  },\n  progress(context) {\n    // Called when build progress updated\n  },\n  allDone(context) {\n    // Called when _all_ compiles finished\n  },\n  beforeAllDone(context) {},\n  afterAllDone(context) {},\n};\n```\n\n`context` is the reference to the plugin. You can use `context.state` to access status.\n\n**Schema of `context.state`:**\n\n```js\n{\n  start, progress, message, details, request, hasErrors;\n}\n```\n\n<h2 align=\"center\">License</h2>\n\n[MIT](./LICENSE)\n\n<!-- Refs -->\n\n[standard-js-src]: https://flat.badgen.net/badge/code%20style/standard/green\n[standard-js-href]: https://standardjs.com\n[npm-version-src]: https://flat.badgen.net/npm/v/webpackbar/latest\n[npm-version-href]: https://npmjs.com/package/webpackbar\n[npm-downloads-src]: https://flat.badgen.net/npm/dm/webpackbar\n[npm-downloads-href]: https://npmjs.com/package/webpackbar\n[package-phobia-src]: https://flat.badgen.net/packagephobia/install/webpackbar\n[package-phobia-href]: https://packagephobia.now.sh/result?p=webpackbar\n[checks-src]: https://flat.badgen.net/github/checks/nuxt-contrib/webpackbar/master\n[checks-href]: https://github.com/nuxt-contrib/webpackbar/actions\n","publish_time":1730902097614,"_cnpm_publish_time":1730902097614,"dist-tags":{"2x":"2.6.4","latest":"7.0.0","prerelease":"5.0.0-2"}}