Skip to content

Commit 3da680b

Browse files
committed
feat(cli): Fix "-h" generating warning
1 parent a1c19ce commit 3da680b

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

cli/bin/quasar

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,11 @@ else {
5858
]
5959

6060
if (cmd) {
61-
if (cmd.length === 1) {
62-
const mapToCmd = {
63-
i: 'info',
64-
h: 'help'
65-
}
66-
cmd = mapToCmd[cmd]
61+
if (cmd === '-h') {
62+
cmd = 'help'
63+
}
64+
else if (cmd === 'i') {
65+
cmd = 'info'
6766
}
6867

6968
if (commands.includes(cmd)) {
@@ -90,6 +89,7 @@ else {
9089
else {
9190
cmd = 'help'
9291
}
92+
9393
require(`./quasar-${cmd}`)
9494
}
9595
}

cli/bin/quasar-help

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ console.log(`
2323
--version, -v Print Quasar CLI version
2424
2525
Commands
26-
create Create a project folder
27-
info Display info about your machine
28-
(and your App if in a project folder)
29-
upgrade Check (and optionally) upgrade Quasar packages
30-
from a Quasar project folder
31-
serve Create an ad-hoc server on App's distributables
32-
help Displays this message
26+
create Create a project folder
27+
info Display info about your machine
28+
(and your App if in a project folder)
29+
upgrade Check (and optionally) upgrade Quasar packages
30+
from a Quasar project folder
31+
serve Create an ad-hoc server on App's distributables
32+
help, -h Displays this message
3333
3434
--------------
3535
=> IMPORTANT !

cli/bin/quasar-serve

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ if (ssrDetected === false) {
135135
const app = express()
136136

137137
if (!argv.silent) {
138-
app.get('*', (req, res, next) => {
138+
app.get('*', (req, _, next) => {
139139
console.log(
140140
`GET ${green(req.url)} ${grey('[' + req.ip + ']')} ${new Date()}`
141141
)

0 commit comments

Comments
 (0)