diff --git a/src/commands/dev/index.js b/src/commands/dev/index.js index d42f255..2c4ab66 100644 --- a/src/commands/dev/index.js +++ b/src/commands/dev/index.js @@ -191,6 +191,7 @@ class DevCommand extends Command { `${NETLIFYDEVWARN} No dev server detected, using simple static server` ); let dist = + flags.dir || (config.dev && config.dev.publish) || (config.build && config.build.publish); if (!dist) { @@ -211,7 +212,7 @@ class DevCommand extends Command { } settings = { noCmd: true, - port: 8888, + port: flags.port || 8888, proxyPort: 3999, dist }; @@ -296,7 +297,7 @@ DevCommand.strict = false; DevCommand.flags = { command: flags.string({ char: "c", description: "command to run" }), port: flags.integer({ char: "p", description: "port of netlify dev" }), - dir: flags.integer({ char: "d", description: "dir with static files" }), + dir: flags.string({ char: "d", description: "dir with static files" }), functions: flags.string({ char: "f", description: "Specify a functions folder to serve"