Skip to content

Commit

Permalink
set default options for dev command (#4932)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed May 16, 2022
1 parent ae416be commit 6205a11
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/yellow-eagles-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

Set default options for dev command
8 changes: 4 additions & 4 deletions packages/kit/src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ const prog = sade('svelte-kit').version('__VERSION__');
prog
.command('dev')
.describe('Start a development server')
.option('-p, --port', 'Port')
.option('-o, --open', 'Open a browser tab')
.option('--host', 'Host (only use this on trusted networks)')
.option('--https', 'Use self-signed HTTPS certificate')
.option('-p, --port', 'Port', 3000)
.option('-o, --open', 'Open a browser tab', false)
.option('--host', 'Host (only use this on trusted networks)', 'localhost')
.option('--https', 'Use self-signed HTTPS certificate', false)
.option('-H', 'no longer supported, use --https instead') // TODO remove for 1.0
.action(async ({ port, host, https, open, H }) => {
try {
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/core/dev/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import * as sync from '../sync/sync.js';
* @typedef {{
* cwd: string,
* port: number,
* host?: string,
* host: string,
* https: boolean,
* config: import('types').ValidatedConfig
* }} Options
Expand Down

0 comments on commit 6205a11

Please sign in to comment.