@@ -7,12 +7,218 @@ const RESPONSE_GROUP = 'Response options:';
77const BASIC_GROUP = 'Basic options:' ;
88
99module . exports = {
10- core : [
10+ devServer : [
11+ {
12+ name : 'bonjour' ,
13+ type : Boolean ,
14+ describe : 'Broadcasts the server via ZeroConf networking on start' ,
15+ } ,
16+ {
17+ name : 'lazy' ,
18+ type : Boolean ,
19+ describe : 'Lazy' ,
20+ } ,
21+ {
22+ name : 'liveReload' ,
23+ type : Boolean ,
24+ defaultValue : true ,
25+ describe : 'Enables/Disables live reloading on changing files' ,
26+ } ,
27+ {
28+ name : 'serveIndex' ,
29+ type : Boolean ,
30+ describe : 'Enables/Disables serveIndex middleware' ,
31+ defaultValue : true ,
32+ } ,
1133 {
1234 name : 'inline' ,
1335 type : Boolean ,
1436 defaultValue : true ,
15- description : 'inline' ,
37+ describe :
38+ 'Inline mode (set to false to disable including client scripts like livereload)' ,
39+ } ,
40+ {
41+ name : 'profile' ,
42+ type : Boolean ,
43+ describe : 'Print compilation profile data for progress steps' ,
44+ } ,
45+ {
46+ name : 'progress' ,
47+ type : Boolean ,
48+ describe : 'Print compilation progress in percentage' ,
49+ group : BASIC_GROUP ,
50+ } ,
51+ {
52+ name : 'hot-only' ,
53+ type : Boolean ,
54+ describe : 'Do not refresh page if HMR fails' ,
55+ group : ADVANCED_GROUP ,
56+ } ,
57+ {
58+ name : 'stdin' ,
59+ type : Boolean ,
60+ describe : 'close when stdin ends' ,
61+ } ,
62+ {
63+ name : 'open' ,
64+ type : String ,
65+ describe : 'Open the default browser, or optionally specify a browser name' ,
66+ } ,
67+ {
68+ name : 'useLocalIp' ,
69+ type : Boolean ,
70+ describe : 'Open default browser with local IP' ,
71+ } ,
72+ {
73+ name : 'open-page' ,
74+ type : String ,
75+ describe : 'Open default browser with the specified page' ,
76+ } ,
77+ // instead of this option, we should consider retrieving the 'color' option
78+ // from the compiler (since webpack CLI already has 'color' option)
79+ // also, we should reconsider how to use supports-color with command-line-args
80+ // {
81+ // name: 'colors',
82+ // type: Boolean,
83+ // // alias: 'color',
84+ // defaultValue: function supportsColor() {
85+ // // Use `require('supports-color').stdout` for supports-color >= 5.0.0.
86+ // // See https://github.com/webpack/webpack-dev-server/pull/1555.
87+ // return require('supports-color').stdout;
88+ // },
89+ // group: DISPLAY_GROUP,
90+ // describe: 'Enables/Disables colors on the console',
91+ // },
92+ // we need to rethink this option, since it is CLI only at the moment
93+ // {
94+ // name: 'info',
95+ // type: Boolean,
96+ // group: DISPLAY_GROUP,
97+ // defaultValue: true,
98+ // describe: 'Info',
99+ // },
100+ {
101+ name : 'quiet' ,
102+ type : Boolean ,
103+ group : DISPLAY_GROUP ,
104+ describe : 'Quiet' ,
105+ } ,
106+ {
107+ name : 'client-log-level' ,
108+ type : String ,
109+ group : DISPLAY_GROUP ,
110+ defaultValue : 'info' ,
111+ describe :
112+ 'Log level in the browser (trace, debug, info, warn, error or silent)' ,
113+ } ,
114+ {
115+ name : 'https' ,
116+ type : Boolean ,
117+ group : SSL_GROUP ,
118+ describe : 'HTTPS' ,
119+ } ,
120+ {
121+ name : 'http2' ,
122+ type : Boolean ,
123+ group : SSL_GROUP ,
124+ describe : 'HTTP/2, must be used with HTTPS' ,
125+ } ,
126+ {
127+ name : 'key' ,
128+ type : String ,
129+ describe : 'Path to a SSL key.' ,
130+ group : SSL_GROUP ,
131+ } ,
132+ {
133+ name : 'cert' ,
134+ type : String ,
135+ describe : 'Path to a SSL certificate.' ,
136+ group : SSL_GROUP ,
137+ } ,
138+ {
139+ name : 'cacert' ,
140+ type : String ,
141+ describe : 'Path to a SSL CA certificate.' ,
142+ group : SSL_GROUP ,
143+ } ,
144+ {
145+ name : 'pfx' ,
146+ type : String ,
147+ describe : 'Path to a SSL pfx file.' ,
148+ group : SSL_GROUP ,
149+ } ,
150+ {
151+ name : 'pfx-passphrase' ,
152+ type : String ,
153+ describe : 'Passphrase for pfx file.' ,
154+ group : SSL_GROUP ,
155+ } ,
156+ {
157+ name : 'content-base' ,
158+ type : String ,
159+ describe : 'A directory or URL to serve HTML content from.' ,
160+ group : RESPONSE_GROUP ,
161+ } ,
162+ {
163+ name : 'watch-content-base' ,
164+ type : Boolean ,
165+ describe : 'Enable live-reloading of the content-base.' ,
166+ group : RESPONSE_GROUP ,
167+ } ,
168+ {
169+ name : 'history-api-fallback' ,
170+ type : Boolean ,
171+ describe : 'Fallback to /index.html for Single Page Applications.' ,
172+ group : RESPONSE_GROUP ,
173+ } ,
174+ {
175+ name : 'compress' ,
176+ type : Boolean ,
177+ describe : 'Enable gzip compression' ,
178+ group : RESPONSE_GROUP ,
179+ } ,
180+ // findPort is currently not set up
181+ {
182+ name : 'port' ,
183+ type : Number ,
184+ describe : 'The port' ,
185+ defaultValue : 8080 ,
186+ group : CONNECTION_GROUP ,
187+ } ,
188+ {
189+ name : 'disable-host-check' ,
190+ type : Boolean ,
191+ describe : 'Will not check the host' ,
192+ group : CONNECTION_GROUP ,
193+ } ,
194+ {
195+ name : 'socket' ,
196+ type : String ,
197+ describe : 'Socket to listen' ,
198+ group : CONNECTION_GROUP ,
199+ } ,
200+ {
201+ name : 'public' ,
202+ type : String ,
203+ describe : 'The public hostname/ip address of the server' ,
204+ group : CONNECTION_GROUP ,
205+ } ,
206+ {
207+ name : 'host' ,
208+ type : String ,
209+ defaultValue : 'localhost' ,
210+ describe : 'The hostname/ip address the server will bind to' ,
211+ group : CONNECTION_GROUP ,
212+ } ,
213+ // use command-line-args "multiple" option, allowing the usage: --allowed-hosts host1 host2 host3
214+ // instead of the old, comma-separated syntax: --allowed-hosts host1,host2,host3
215+ {
216+ name : 'allowed-hosts' ,
217+ type : String ,
218+ describe :
219+ 'A list of hosts that are allowed to access the dev server, separated by spaces' ,
220+ group : CONNECTION_GROUP ,
221+ multiple : true ,
16222 } ,
17223 ] ,
18224} ;
0 commit comments