progress-bar-webpack-plugin

A progress bar plugin for Webpack.

Github星跟蹤圖

progress-bar-webpack-plugin

progress-bar-webpack-plugin

Installation

npm i -D progress-bar-webpack-plugin

Usage

Include the following in your Webpack config.

var ProgressBarPlugin = require('progress-bar-webpack-plugin');

...

plugins: [
  new ProgressBarPlugin()
]

Options

Accepts almost all of the same options as node-progress.

  • format the format of the progress bar
  • width the displayed width of the progress bar defaulting to total
  • complete completion character defaulting to "="
  • incomplete incomplete character defaulting to " "
  • renderThrottle minimum time between updates in milliseconds defaulting to 16
  • clear option to clear the bar on completion defaulting to true
  • callback optional function to call when the progress bar completes
  • stream the output stream defaulting to stderr
  • summary option to show summary of time taken defaulting to true
  • summaryContent optional custom summary message if summary option is false
  • customSummary optional function to display a custom summary (passed build time)

The format option accepts the following tokens:

  • :bar the progress bar itself
  • :current current tick number
  • :total total ticks
  • :elapsed time elapsed in seconds
  • :percent completion percentage
  • :msg current progress message

The default format uses the :bar and :percent tokens.

Use chalk to sprinkle on a few colors.

To include the time elapsed and prevent the progress bar from being cleared on build completion:

new ProgressBarPlugin({
  format: '  build [:bar] ' + chalk.green.bold(':percent') + ' (:elapsed seconds)',
  clear: false
})

License

MIT

主要指標

概覽
名稱與所有者clessg/progress-bar-webpack-plugin
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2015-10-20 19:23:23
推送於2022-05-23 20:56:40
最后一次提交2022-05-23 20:56:09
發布數20
最新版本名稱v2.1.0 (發布於 2020-01-14 07:41:29)
第一版名稱1.0.0 (發布於 )
用户参与
星數430
關注者數4
派生數38
提交數76
已啟用問題?
問題數26
打開的問題數13
拉請求數13
打開的拉請求數2
關閉的拉請求數1
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?