ghost-progress-webpack-plugin
Version:
A no side effects progress plugin for webpack.
62 lines (45 loc) • 2.04 kB
Markdown
# ghost-progress-webpack-plugin
[](https://www.npmjs.com/package/ghost-progress-webpack-plugin)
[](https://www.npmjs.com/package/ghost-progress-webpack-plugin)
一个没有副作用的 webpack 进度插件。
语言: [English](https://github.com/ZSkycat/ghost-progress-webpack-plugin#readme) | [中文](https://github.com/ZSkycat/ghost-progress-webpack-plugin/blob/master/README.zh.md)
## 特色
- 不会影响其他工具的输出
- 不会留下丑陋的输出
- 不适合在 CI 环境中使用 (可使用 [simple-progress-webpack-plugin](https://github.com/dominique-mueller/simple-progress-webpack-plugin))

## 起步
#### 安装
```
npm install --save-dev ghost-progress-webpack-plugin
```
#### 用法
```javascript
// 导入
const GhostProgressWebpackPlugin = require('ghost-progress-webpack-plugin').GhostProgressWebpackPlugin;
// 在 webpack 插件配置中实例化它
plugins: [
new GhostProgressWebpackPlugin()
]
```
## API
```
new GhostProgressWebpackPlugin(format: string);
new GhostProgressWebpackPlugin(options: object);
```
### options.format
**类型:** `'compact' | 'detailed' | 'bar'`<br>
**默认:** `'compact'`<br>
设置输出格式。
`'compact'`

`'detailed'`

`'bar'`

### options.stream
**类型:** `NodeJS.WriteStream`<br>
**默认:** `process.stderr`<br>
设置输出所使用的写入流。
## 协议许可
[MIT](https://github.com/ZSkycat/ghost-progress-webpack-plugin/blob/master/LICENSE.txt)