File tree 1 file changed +11
-0
lines changed
packages/@vue/cli-service/lib/commands
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ module.exports = (api, options) => {
19
19
options : {
20
20
'--open' : `open browser on server start` ,
21
21
'--copy' : `copy url to clipboard on server start` ,
22
+ '--stdin' : `close when stdin ends` ,
22
23
'--mode' : `specify env mode (default: development)` ,
23
24
'--host' : `specify host (default: ${ defaults . host } )` ,
24
25
'--port' : `specify port (default: ${ defaults . port } )` ,
@@ -204,6 +205,16 @@ module.exports = (api, options) => {
204
205
} )
205
206
} )
206
207
208
+ if ( args . stdin ) {
209
+ process . stdin . on ( 'end' , ( ) => {
210
+ server . close ( ( ) => {
211
+ process . exit ( 0 )
212
+ } )
213
+ } )
214
+
215
+ process . stdin . resume ( )
216
+ }
217
+
207
218
// on appveyor, killing the process with SIGTERM causes execa to
208
219
// throw error
209
220
if ( process . env . VUE_CLI_TEST ) {
You can’t perform that action at this time.
0 commit comments