Skip to content

Commit 0d128df

Browse files
authored
feat(app-vite): Add --silent option to prepare command (#18213)
1 parent 7ee81a1 commit 0d128df

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app-vite/lib/cmd/prepare.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { log } from '../utils/logger.js'
44

55
const argv = parseArgs(process.argv.slice(2), {
66
alias: {
7+
s: 'silent',
78
h: 'help'
89
},
910
boolean: [ 'h' ]
@@ -21,19 +22,22 @@ if (argv.help) {
2122
$ quasar prepare
2223
2324
Options
25+
--silent, -s Suppress the startup banner
2426
--help, -h Displays this message
2527
`)
2628
process.exit(0)
2729
}
2830

2931
const { readFileSync } = await import('node:fs')
3032

31-
console.log(
32-
readFileSync(
33-
new URL('../../assets/logo.art', import.meta.url),
34-
'utf8'
33+
if (!argv.silent) {
34+
console.log(
35+
readFileSync(
36+
new URL('../../assets/logo.art', import.meta.url),
37+
'utf8'
38+
)
3539
)
36-
)
40+
}
3741

3842
const { getCtx } = await import('../utils/get-ctx.js')
3943
// ctx doesn't matter for this command

0 commit comments

Comments
 (0)