create-moov-app
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -22,3 +22,11 @@ const { calculatePwaPath, getProjectName } = require('./utils'); | ||
const userConfig = await promptForConfig(); | ||
let userConfig; | ||
try { | ||
userConfig = await promptForConfig(); | ||
} catch(err) { | ||
console.log(err.message); | ||
return; | ||
} | ||
if (await createMoovAppInternal(userConfig)) { | ||
@@ -25,0 +33,0 @@ console.log(`Moov PWA created in ${calculatePwaPath(userConfig)}. Head to that directory and run "${_calculateStartCommand()}" to see it in action!`); |
@@ -102,3 +102,10 @@ const prompts = require('prompts'); | ||
const promptForConfig = async () => { | ||
return await prompts(questions); | ||
const userInput = await prompts(questions); | ||
// If the user has not provided all input, abort. | ||
if (Object.keys(userInput).length !== questions.length) { | ||
throw new Error('User configuration is incomplete. Aborting.'); | ||
} | ||
return userInput; | ||
}; | ||
@@ -105,0 +112,0 @@ |
{ | ||
"name": "create-moov-app", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Utility to create Moov PWA projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,3 +14,6 @@ # create-moov-app | ||
## Release Notes | ||
### 1.0.1 - Oct 1, 2018 | ||
* Fix issue where project creation would continue after canceling configuration. | ||
### 1.0.0 - Sep 26, 2018 | ||
* Initial release. | ||
* Initial release. |
71429
382
19