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

Commit 74e206e

Browse files
authored
Merge pull request #104 from netlify/enable-flags
fix: Enable flags for port and cmd
2 parents 4a27baf + 25f63dc commit 74e206e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ USAGE
6868
$ netlify dev
6969

7070
OPTIONS
71-
-c, --cmd=cmd command to run
71+
-c, --command=command command to run
7272
-f, --functions=functions Specify a functions folder to serve
7373
-o, --offline disables any features that require network access
7474
-p, --port=port Specify port of netlify dev

src/commands/dev/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ function startDevServer(settings, log, error) {
169169
class DevCommand extends Command {
170170
async run() {
171171
this.log(`${NETLIFYDEV} Starting Netlify Dev...`);
172-
const { flags, args } = this.parse(DevCommand);
172+
let { flags } = this.parse(DevCommand);
173173
const { api, site, config } = this.netlify;
174174
const functionsDir =
175175
flags.functions ||
@@ -184,7 +184,7 @@ class DevCommand extends Command {
184184
}
185185
process.env.NETLIFY_DEV = "true";
186186

187-
let settings = await serverSettings(config.dev);
187+
let settings = await serverSettings(Object.assign(config.dev, flags));
188188

189189
if (!(settings && settings.command)) {
190190
this.log(
@@ -276,7 +276,7 @@ DevCommand.examples = [
276276
DevCommand.strict = false;
277277

278278
DevCommand.flags = {
279-
cmd: flags.string({ char: "c", description: "command to run" }),
279+
command: flags.string({ char: "c", description: "command to run" }),
280280
port: flags.integer({ char: "p", description: "port of netlify dev" }),
281281
dir: flags.integer({ char: "d", description: "dir with static files" }),
282282
functions: flags.string({

0 commit comments

Comments
 (0)