Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
answers.preset = input.preset
if (input.save) {
answers.save = true
answers.saveName = input.save
}
setProgress({
info: 'Resolving preset...'
})
let preset
if (input.preset === '__remote__' && input.remote) {
// vue create foo --preset bar
preset = await creator.resolvePreset(input.remote, input.clone)
} else if (input.preset === 'default') {
// vue create foo --default
preset = defaults.presets.default
} else {
preset = await creator.promptAndResolvePreset(answers)
}
setProgress({
info: null
})
// Create
const args = [
'--skipGetStarted'
]
if (input.packageManager) args.push('--packageManager', input.packageManager)
if (input.bar) args.push('--bare')
if (input.force) args.push('--force')
// Git
if (input.enableGit && input.gitCommitMessage) {
answers.preset = input.preset
if (input.save) {
answers.save = true
answers.saveName = input.save
}
setProgress({
info: 'Resolving preset...'
})
let preset
if (input.preset === '__remote__' && input.remote) {
// vue create foo --preset bar
preset = await creator.resolvePreset(input.remote, input.clone)
} else if (input.preset === 'default') {
// vue create foo --default
preset = defaults.presets.default
} else {
preset = await creator.promptAndResolvePreset(answers)
}
setProgress({
info: null
})
// Create
await creator.create(createOptions, preset)
removeCreator()
notify({
title: `Project created`,
message: `Project ${cwd.get()} created`,
icon: 'done'
})