Skip to content

Commit

Permalink
♻️ Improve conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Dec 30, 2024
1 parent 25aa611 commit 27aed1c
Showing 1 changed file with 15 additions and 22 deletions.
37 changes: 15 additions & 22 deletions libs/create-qwikdev-astro/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,31 +238,24 @@ export class Application extends Program<Definition, Input> {
adapter = definition.adapter;
}

const biome =
ask && !add && definition.biome === undefined
? !!(await this.scanBoolean(
definition,
"Would you prefer Biome over ESLint/Prettier?"
))
: !!definition.biome;
const biome = !!(ask && !add && definition.biome === undefined
? await this.scanBoolean(definition, "Would you prefer Biome over ESLint/Prettier?")
: definition.biome);

const ci =
ask && definition.ci === undefined
? !!(await this.scanBoolean(definition, "Would you like to add CI workflow?"))
: !!definition.ci;
const ci = !!(ask && definition.ci === undefined
? await this.scanBoolean(definition, "Would you like to add CI workflow?")
: definition.ci);

const install =
ask && definition.install === undefined
? !!(await this.scanBoolean(
definition,
`Would you like to install ${this.#packageManger} dependencies?`
))
: !!definition.install;
const install = !!(ask && definition.install === undefined
? await this.scanBoolean(
definition,
`Would you like to install ${this.#packageManger} dependencies?`
)
: definition.install);

const git =
ask && definition.git === undefined
? !!(await this.scanBoolean(definition, "Would you like to initialize Git?"))
: !!definition.git;
const git = !!(ask && definition.git === undefined
? await this.scanBoolean(definition, "Would you like to initialize Git?")
: definition.git);

const dryRun = !!definition.dryRun;

Expand Down

0 comments on commit 27aed1c

Please sign in to comment.