mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
show more detailed progress
This commit is contained in:
parent
f66e43d68a
commit
4cea3fb159
@ -10,7 +10,7 @@ module.exports = class ProgressPlugin extends webpack.ProgressPlugin {
|
||||
constructor(options) {
|
||||
super(options)
|
||||
|
||||
this.handler = (percent, msg) => this.updateProgress(percent, msg)
|
||||
this.handler = (percent, msg, ...details) => this.updateProgress(percent, msg, details)
|
||||
|
||||
this.options = options
|
||||
|
||||
@ -27,7 +27,7 @@ module.exports = class ProgressPlugin extends webpack.ProgressPlugin {
|
||||
return sharedState[this.options.name]
|
||||
}
|
||||
|
||||
updateProgress(percent, msg) {
|
||||
updateProgress(percent, msg, details) {
|
||||
const progress = Math.floor(percent * 100)
|
||||
|
||||
this.state.progress = progress
|
||||
@ -76,8 +76,7 @@ module.exports = class ProgressPlugin extends webpack.ProgressPlugin {
|
||||
})
|
||||
|
||||
// Update spinner
|
||||
|
||||
this.spinner.start()
|
||||
this.spinner.text = 'Compiling ' + progressbars.join('') + ' ' + additional.join(' ')
|
||||
this.spinner.text = _.startCase(msg) + ' ' + progressbars.join('') + ' ' + additional.join(' ')
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user