mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-04-21 11:58:36 -05:00
feat: add --port argument to 'vue serve' command (#4342)
(cherry picked from commit 59d3e74f33)
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user