Skip to content

Conversation

@troym9731
Copy link

Even when specifying a templateName in a config file, the "Do you wanna choose a template" prompt comes up.

It seems like now that the config object is a combination of both the args and the config passed by the user, it should be fine to get rid of this prompt and just check for the existence of config.t, config.template, or config.templateName.


async function getTemplateOption() {
const templateArg = args.t || args.template
const templateArg = config.t || config.template || config.templateName
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your catch!
This line is ok ;)

return getTemplatesPath(templateArg)
}

const { template } = await inquirer.prompt([
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines of code need in case the template is not specified in the config.
The behavior is expected because one of the features of the tool is to use templates from the community.
screen shot 2018-11-20 at 23 39 20

Could you please commit again with these lines of code?
Thank you so much man for your contribution 👍

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, no problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants