fix: show generate message on each call

This commit is contained in:
Pooya Parsa 2018-03-16 10:02:07 +03:30
parent f2b3e780e0
commit f66e43d68a

View File

@ -120,8 +120,6 @@ module.exports = class Builder {
this.spinner.succeed('Builder initialized')
this.spinner.start(`Generating nuxt files...`)
debug(`App root: ${this.options.srcDir}`)
// Create .nuxt/, .nuxt/components and .nuxt/dist folders
@ -134,9 +132,7 @@ module.exports = class Builder {
// Generate routes and interpret the template files
await this.generateRoutesAndFiles()
this.spinner.succeed('Nuxt files generated')
this.spinner.start('Compiling...')
this.spinner.info('Starting webpack...')
// Start webpack build
await this.webpackBuild()
@ -184,7 +180,8 @@ module.exports = class Builder {
}
async generateRoutesAndFiles() {
debug('Generating files...')
this.spinner.start(`Generating nuxt files...`)
// -- Templates --
let templatesFiles = [
'App.js',
@ -445,6 +442,8 @@ module.exports = class Builder {
await writeFile(path, content, 'utf8')
})
)
this.spinner.succeed('Nuxt files generated')
}
async webpackBuild() {