Skip to content

Commit 672d8ee

Browse files
committed
feat(app-webpack): Add --silent option to prepare command (#18213)
1 parent 0d128df commit 672d8ee

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

app-vite/lib/cmd/prepare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const argv = parseArgs(process.argv.slice(2), {
77
s: 'silent',
88
h: 'help'
99
},
10-
boolean: [ 'h' ]
10+
boolean: [ 's', 'h' ]
1111
})
1212

1313
if (argv.help) {

app-webpack/lib/cmd/prepare.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ const { log } = require('../utils/logger.js')
44

55
const argv = parseArgs(process.argv.slice(2), {
66
alias: {
7+
s: 'silent',
78
h: 'help'
89
},
9-
boolean: [ 'h' ]
10+
boolean: [ 's', 'h' ]
1011
})
1112

1213
if (argv.help) {
@@ -21,6 +22,7 @@ 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)
@@ -29,12 +31,14 @@ if (argv.help) {
2931
const { readFileSync } = require('node:fs')
3032
const { join } = require('node:path')
3133

32-
console.log(
33-
readFileSync(
34-
join(__dirname, '../../assets/logo.art'),
35-
'utf8'
34+
if (!argv.silent) {
35+
console.log(
36+
readFileSync(
37+
join(__dirname, '../../assets/logo.art'),
38+
'utf8'
39+
)
3640
)
37-
)
41+
}
3842

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

0 commit comments

Comments
 (0)