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