1 | [![npm][npm]][npm-url]
|
2 | [![deps][deps]][deps-url]
|
3 | [![test][test]][test-url]
|
4 | [![test-windows][test-win]][test-win-url]
|
5 | [![coverage][cover]][cover-url]
|
6 |
|
7 | <div align="center">
|
8 |
|
9 | <img width="200" height="200" hspace="25" src="./assets/logo.svg">
|
10 | <a href="https://webpack.js.org/">
|
11 | <img width="200" height="200" hspace="25" src="https://cdn.rawgit.com/webpack/media/e7485eb2/logo/icon-square-big.svg">
|
12 | </a>
|
13 | <p>Elegant ProgressBar and Profiler for Webpack</p>
|
14 | </div>
|
15 |
|
16 | ✔ Display elegant progress bar while building or watch
|
17 |
|
18 | ✔ Support of multiply concurrent builds (useful for SSR)
|
19 |
|
20 | ✔ Pretty print filename and loaders
|
21 |
|
22 | ✔ Windows compatible
|
23 |
|
24 | ✔ Customizable
|
25 |
|
26 | ✔ Advanced build profiler
|
27 |
|
28 | <div align="center">
|
29 | <br>
|
30 | <img src="./assets/screen1.jpg" width="600px">
|
31 | <p>Multi progress bars</p>
|
32 | <br>
|
33 | </div>
|
34 |
|
35 | <div align="center">
|
36 | <br>
|
37 | <img src="./assets/screen2.jpg" width="90%">
|
38 | <p>Build Profiler</p>
|
39 | <br>
|
40 | </div>
|
41 |
|
42 | <h2 align="center">Getting Started</h2>
|
43 |
|
44 | To begin, you'll need to install `webpackbar`:
|
45 |
|
46 | Using npm:
|
47 |
|
48 | ```bash
|
49 | npm install webpackbar
|
50 | ```
|
51 |
|
52 | Using yarn:
|
53 |
|
54 | ```bash
|
55 | yarn add webpackbar
|
56 | ```
|
57 |
|
58 | Then add the reporter as a plugin to your webpack config.
|
59 |
|
60 | **webpack.config.js**
|
61 |
|
62 | ```js
|
63 | const webpack = require('webpack');
|
64 | const WebpackBar = require('webpackbar');
|
65 |
|
66 | module.exports = {
|
67 | context: path.resolve(__dirname),
|
68 | devtool: 'source-map',
|
69 | entry: './entry.js',
|
70 | output: {
|
71 | filename: './output.js',
|
72 | path: path.resolve(__dirname)
|
73 | },
|
74 | plugins: [
|
75 | new WebpackBar()
|
76 | ]
|
77 | };
|
78 | ```
|
79 |
|
80 | <h2 align="center">Options</h2>
|
81 |
|
82 | ### `enabled`
|
83 |
|
84 | By default only enabled when TTY is available and
|
85 | not running in a [CI](https://github.com/watson/is-ci) environment.
|
86 |
|
87 | You can force override this option by setting it to `true` or `false`.
|
88 |
|
89 | ### `name`
|
90 | - Default: `webpack`
|
91 |
|
92 | Display name
|
93 |
|
94 | ### `color`
|
95 | - Default: `green`
|
96 |
|
97 | Display color (can be hex (`#xxyyzz`) or a web color like `green`)
|
98 |
|
99 | ### `profile`
|
100 | - Default: `false`
|
101 |
|
102 | Enable profiler
|
103 |
|
104 | ### `stream`
|
105 | - Default: `process.stdout`
|
106 |
|
107 | Output stream.
|
108 |
|
109 | ### `showCursor`
|
110 | - Default: `false`
|
111 |
|
112 | Show the cursor. This can be useful when a CLI accepts input from a user.
|
113 |
|
114 | ### `clear`
|
115 | - Default: `true`
|
116 |
|
117 | Auto clear console when compile is finished.
|
118 |
|
119 | ### `done`
|
120 | - Type: `Function(sharedState, ctx)`
|
121 |
|
122 | A function that will be called when **all** builds are finished.
|
123 |
|
124 | This function can optionally return `false` as a signal to stop rendering and printing profile stats.
|
125 |
|
126 | <h2 align="center">Maintainers</h2>
|
127 |
|
128 | <table>
|
129 | <tbody>
|
130 | <tr>
|
131 | <td align="center">
|
132 | <a href="https://github.com/pi0">
|
133 | <img width="150" height="150" src="https://github.com/pi0.png">
|
134 | </br>
|
135 | Pooya Parsa
|
136 | </a>
|
137 | </td>
|
138 | </tr>
|
139 | <tbody>
|
140 | </table>
|
141 |
|
142 | [npm]: https://img.shields.io/npm/v/webpackbar.svg?style=flat-square
|
143 | [npm-url]: https://npmjs.com/package/webpackbar
|
144 |
|
145 | [deps]: https://david-dm.org/nuxt/webpackbar.svg?style=flat-square
|
146 | [deps-url]: https://david-dm.org/nuxt/webpackbar
|
147 |
|
148 | [test]: https://img.shields.io/circleci/project/github/nuxt/webpackbar/master.svg?style=flat-square
|
149 | [test-url]: https://circleci.com/gh/nuxt/webpackbar
|
150 |
|
151 | [test-win]: https://img.shields.io/appveyor/ci/nuxt/webpackbar.svg?logo=appveyor&style=flat-square
|
152 | [test-win-url]: https://ci.appveyor.com/project/nuxt/webpackbar
|
153 |
|
154 | [cover]: https://codecov.io/gh/nuxt/webpackbar/branch/master/graph/badge.svg?style=flat-square
|
155 | [cover-url]: https://codecov.io/gh/nuxt/webpackbar
|