From 7760e9a49b8f3ba85dd02406a5c5b3a43531ee50 Mon Sep 17 00:00:00 2001 From: Sebastien Chopin Date: Mon, 12 Jun 2017 19:36:47 +0200 Subject: [PATCH] generate: exit when done and send back duration & errors --- bin/nuxt-generate | 1 + lib/generate.js | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/nuxt-generate b/bin/nuxt-generate index c187810fa1..7d8c194db2 100755 --- a/bin/nuxt-generate +++ b/bin/nuxt-generate @@ -24,6 +24,7 @@ var nuxt = module.exports = new Nuxt(options) nuxt.generate() .then(() => { console.log('[nuxt] Generate done') // eslint-disable-line no-console + process.exit(0) }) .catch((err) => { console.error(err) // eslint-disable-line no-console diff --git a/lib/generate.js b/lib/generate.js index 7525cb843d..9436c97c15 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -158,4 +158,5 @@ export default async function () { }) console.error('==== Error report ==== \n' + report.join('\n\n')) // eslint-disable-line no-console } + return { duration, errors } }