Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const run = async opts => {
prompts.inject(opts)
const response = await prompts(form)
if (!response.confirm) {
log('aborted')
process.exit(0)
}
const { name } = response
const template = templates[response.template] || templates[0]
log('creating docs...')
if (!name) {
log.error('name is required')
// todo: prompt again
process.exit(1)
}
const run = async opts => {
prompts.inject(opts)
const response = await prompts(form)
if (!response.confirm) {
log('aborted')
process.exit(0)
}
const { name } = response
const theme = themes[response.theme] || themes[0]
log('Creating docs ...')
if (!name) {
log.error('name is required')
process.exit(1)
}