1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

quiet mode for init

This commit is contained in:
Michael Shanks 2020-04-27 08:56:26 +01:00
parent 754d5224f1
commit 9799c3dad3
2 changed files with 10 additions and 4 deletions

View file

@ -13,10 +13,10 @@ module.exports = {
})
yargs.positional("database", {
type: "string",
describe: "database to use usually couch for dev",
describe: "use a local (PouchDB) or remote (CouchDB) database",
alias: "b",
default: "pouch",
choices: ["pouch", "couch"],
default: "local",
choices: ["local", "remote"],
})
yargs.positional("clientId", {
type: "string",
@ -30,6 +30,12 @@ module.exports = {
alias: "x",
default: "",
})
yargs.positional("quiet", {
type: "boolean",
describe: "flag - if set, then run in quiet mode - use all defaults",
alias: "q",
default: false,
})
},
handler,
}

View file

@ -78,7 +78,7 @@ const createClientDatabse = async opts => {
const createDevEnvFile = async opts => {
const destConfigFile = join(opts.dir, "./.env")
let createConfig = !(await exists(destConfigFile))
let createConfig = !(await exists(destConfigFile)) || opts.quiet
if (!createConfig) {
const answers = await inquirer.prompt([
{