feat(cli): change destination directory
This commit is contained in:
parent
6e48ef1253
commit
1680a35369
13
src/cli.ts
13
src/cli.ts
|
@ -99,6 +99,19 @@ void (async () => {
|
|||
})
|
||||
const filetypes = types.map(i => INDV_DOWNLOADS[i])
|
||||
|
||||
// destination directory
|
||||
const { dest } = await inquirer.prompt({
|
||||
type: 'input',
|
||||
name: 'dest',
|
||||
message: 'Destination Directory:',
|
||||
validate (input: string) {
|
||||
return input && fs.statSync(input).isDirectory()
|
||||
},
|
||||
default: process.cwd(),
|
||||
})
|
||||
// change working directory
|
||||
process.chdir(dest)
|
||||
|
||||
// export files
|
||||
spinner.start()
|
||||
await Promise.all(
|
||||
|
|
Loading…
Reference in New Issue