Skip to content

Commit 9e3a481

Browse files
authored
refactor: use description for cli-flags (#2953)
1 parent 2dd1093 commit 9e3a481

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

bin/cli-flags.js

+19-19
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,50 @@ module.exports = {
1212
{
1313
name: 'host',
1414
type: String,
15-
describe: 'The hostname/ip address the server will bind to',
15+
description: 'The hostname/ip address the server will bind to',
1616
group: CONNECTION_GROUP,
1717
},
1818
{
1919
name: 'port',
2020
type: Number,
21-
describe: 'The port',
21+
description: 'The port',
2222
group: CONNECTION_GROUP,
2323
},
2424
{
2525
name: 'static',
2626
type: [String, Boolean],
27-
describe: 'A directory to serve static content from.',
27+
description: 'A directory to serve static content from.',
2828
group: RESPONSE_GROUP,
2929
multiple: true,
3030
negative: true,
3131
},
3232
{
3333
name: 'live-reload',
3434
type: Boolean,
35-
describe: 'Enables/Disables live reloading on changing files',
35+
description: 'Enables/Disables live reloading on changing files',
3636
negative: true,
3737
},
3838
{
3939
name: 'https',
4040
type: Boolean,
4141
group: SSL_GROUP,
42-
describe: 'HTTPS',
42+
description: 'HTTPS',
4343
},
4444
{
4545
name: 'http2',
4646
type: Boolean,
4747
group: SSL_GROUP,
48-
describe: 'HTTP/2, must be used with HTTPS',
48+
description: 'HTTP/2, must be used with HTTPS',
4949
},
5050
{
5151
name: 'bonjour',
5252
type: Boolean,
53-
describe: 'Broadcasts the server via ZeroConf networking on start',
53+
description: 'Broadcasts the server via ZeroConf networking on start',
5454
},
5555
{
5656
name: 'client-progress',
5757
type: Boolean,
58-
describe: 'Print compilation progress in percentage in the browser',
58+
description: 'Print compilation progress in percentage in the browser',
5959
group: BASIC_GROUP,
6060
processor(opts) {
6161
opts.client = opts.client || {};
@@ -66,7 +66,7 @@ module.exports = {
6666
{
6767
name: 'hot-only',
6868
type: Boolean,
69-
describe: 'Do not refresh page if HMR fails',
69+
description: 'Do not refresh page if HMR fails',
7070
group: ADVANCED_GROUP,
7171
processor(opts) {
7272
opts.hot = 'only';
@@ -76,38 +76,38 @@ module.exports = {
7676
{
7777
name: 'setup-exit-signals',
7878
type: Boolean,
79-
describe: 'Close and exit the process on SIGINT and SIGTERM',
79+
description: 'Close and exit the process on SIGINT and SIGTERM',
8080
group: ADVANCED_GROUP,
8181
defaultValue: true,
8282
negative: true,
8383
},
8484
{
8585
name: 'stdin',
8686
type: Boolean,
87-
describe: 'close when stdin ends',
87+
description: 'close when stdin ends',
8888
},
8989
{
9090
name: 'open',
9191
type: [String, Boolean],
92-
describe:
92+
description:
9393
'Open the default browser, or optionally specify a browser name',
9494
},
9595
{
9696
name: 'use-local-ip',
9797
type: Boolean,
98-
describe: 'Open default browser with local IP',
98+
description: 'Open default browser with local IP',
9999
},
100100
{
101101
name: 'open-page',
102102
type: String,
103-
describe: 'Open default browser with the specified page',
103+
description: 'Open default browser with the specified page',
104104
multiple: true,
105105
},
106106
{
107107
name: 'client-logging',
108108
type: String,
109109
group: DISPLAY_GROUP,
110-
describe:
110+
description:
111111
'Log level in the browser (none, error, warn, info, log, verbose)',
112112
processor(opts) {
113113
opts.client = opts.client || {};
@@ -118,25 +118,25 @@ module.exports = {
118118
{
119119
name: 'history-api-fallback',
120120
type: Boolean,
121-
describe: 'Fallback to /index.html for Single Page Applications.',
121+
description: 'Fallback to /index.html for Single Page Applications.',
122122
group: RESPONSE_GROUP,
123123
},
124124
{
125125
name: 'compress',
126126
type: Boolean,
127-
describe: 'Enable gzip compression',
127+
description: 'Enable gzip compression',
128128
group: RESPONSE_GROUP,
129129
},
130130
{
131131
name: 'public',
132132
type: String,
133-
describe: 'The public hostname/ip address of the server',
133+
description: 'The public hostname/ip address of the server',
134134
group: CONNECTION_GROUP,
135135
},
136136
{
137137
name: 'firewall',
138138
type: String,
139-
describe:
139+
description:
140140
'Enable/disable firewall, or set hosts that are allowed to access the dev server',
141141
group: CONNECTION_GROUP,
142142
multiple: true,

0 commit comments

Comments
 (0)