feat: add --port argument to 'vue serve' command (#4342)

(cherry picked from commit 59d3e74f33)
This commit is contained in:
Boris K
2019-07-25 03:57:00 +02:00
committed by Haoqun Jiang
parent 878c337feb
commit 00538f70da
2 changed files with 5 additions and 3 deletions
+4 -3
View File
@@ -20,9 +20,10 @@ serve a .js or .vue file in development mode with zero config
Options:
-o, --open Open browser
-c, --copy Copy local url to clipboard
-h, --help output usage information
-o, --open Open browser
-c, --copy Copy local url to clipboard
-p, --port <port> Port used by the server (default: 8080 or next available port)
-h, --help Output usage information
```
All you need is an `App.vue` file:
+1
View File
@@ -117,6 +117,7 @@ program
.description('serve a .js or .vue file in development mode with zero config')
.option('-o, --open', 'Open browser')
.option('-c, --copy', 'Copy local url to clipboard')
.option('-p, --port <port>', 'Port used by the server (default: 8080 or next available port)')
.action((entry, cmd) => {
loadCommand('serve', '@vue/cli-service-global').serve(entry, cleanArgs(cmd))
})