Skip to content
This repository has been archived by the owner on Sep 12, 2019. It is now read-only.

Make port and dir flag available #191

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/commands/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -211,7 +212,7 @@ class DevCommand extends Command {
}
settings = {
noCmd: true,
port: 8888,
port: flags.port || 8888,
proxyPort: 3999,
dist
};
Expand Down Expand Up @@ -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"
Expand Down