From e407277e0c61ed8a53a7ad58a09c8016a7a1e145 Mon Sep 17 00:00:00 2001 From: brandonocasey Date: Thu, 13 Sep 2018 11:32:15 -0400 Subject: [PATCH] fix: The --hurry option --- generators/app/constants.js | 6 +++--- generators/app/index.js | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/generators/app/constants.js b/generators/app/constants.js index fb401d6b..35416281 100644 --- a/generators/app/constants.js +++ b/generators/app/constants.js @@ -44,11 +44,11 @@ module.exports = { LICENSE_DEFAULT, PROMPT_DEFAULTS: { - docs: false, - css: false, + docs: true, + css: true, prepush: false, precommit: true, - lang: false, + lang: true, license: LICENSE_DEFAULT, pluginType: 'advanced', name: path.basename(process.cwd()).replace(/^videojs-/, '') diff --git a/generators/app/index.js b/generators/app/index.js index 50d86b8e..fc202e73 100644 --- a/generators/app/index.js +++ b/generators/app/index.js @@ -77,6 +77,10 @@ module.exports = class extends Generator { // purposes of the prompt (otherwise it will be rejected by validation). defaults.name = naming.getBasicName(defaults.name); + // we need to default the description to an empty string for + // --hurry + defaults.description = ''; + // The package.json stores a value from `LICENSE_NAMES`, so in that // case, we need to find the key instead of the value. if (pkg && pkg.license && pkg.license === defaults.license) { @@ -242,6 +246,7 @@ module.exports = class extends Generator { */ prompting() { if (this.options.skipPrompt) { + _.assign(this._preconfigs, this._getPromptDefaults()); return; }