@@ -184,13 +184,19 @@ class DevCommand extends Command {
184
184
}
185
185
process . env . NETLIFY_DEV = "true" ;
186
186
187
- let settings = await serverSettings ( Object . assign ( { } , config . dev , flags ) ) ;
187
+ let settings = await serverSettings ( Object . assign ( { } , config . dev , {
188
+ command : flags . command ,
189
+ port : flags . port ,
190
+ functions : flags . functions ,
191
+ publish : flags . dir ,
192
+ } ) ) ;
188
193
189
194
if ( ! ( settings && settings . command ) ) {
190
195
this . log (
191
196
`${ NETLIFYDEVWARN } No dev server detected, using simple static server`
192
197
) ;
193
198
let dist =
199
+ flags . dir ||
194
200
( config . dev && config . dev . publish ) ||
195
201
( config . build && config . build . publish ) ;
196
202
if ( ! dist ) {
@@ -211,7 +217,7 @@ class DevCommand extends Command {
211
217
}
212
218
settings = {
213
219
noCmd : true ,
214
- port : 8888 ,
220
+ port : flags . port || 8888 ,
215
221
proxyPort : 3999 ,
216
222
dist
217
223
} ;
@@ -296,7 +302,7 @@ DevCommand.strict = false;
296
302
DevCommand . flags = {
297
303
command : flags . string ( { char : "c" , description : "command to run" } ) ,
298
304
port : flags . integer ( { char : "p" , description : "port of netlify dev" } ) ,
299
- dir : flags . integer ( { char : "d" , description : "dir with static files" } ) ,
305
+ dir : flags . string ( { char : "d" , description : "dir with static files" } ) ,
300
306
functions : flags . string ( {
301
307
char : "f" ,
302
308
description : "Specify a functions folder to serve"
0 commit comments