Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* file
*/
if (state.eslint === null) {
try {
state.eslint = await new Prompt().confirm('Setup eslint?')
} catch (_) {
process.exit(1)
}
}
/**
* Ensuring that defined path exists
*/
ensureDirSync(absPath)
if (!isEmptyDir(absPath)) {
const errors = [
`Cannot overwrite contents of {${projectRoot}} directory.`,
'Make sure to define path to an empty directory',
]
logger.error(errors.join(' '))
return
}
/**
* Set environment variables that can be used by the packages
* to tweak their setup behavior
*/
process.env['ADONIS_CREATE_APP_NAME'] = state.name
process.env['ADONIS_CREATE_ESLINT'] = String(state.eslint)
process.env['ADONIS_CREATE_APP_CLIENT'] = state.client