@@ -9,6 +9,7 @@ const initNoExtQuestions = [
9
9
{ search : / ^ \? .+ / , response : '\n' } ,
10
10
] ;
11
11
12
+ /* eslint-disable max-len */
12
13
const commands = [
13
14
{ cmd : 'rm' , args : [ '-r' , 'test-project' ] , ignoreErrors : true } ,
14
15
{ cmd : './node_modules/.bin/vue' , args : [ 'init' , '.' , 'test-project' ] , responses : initQuestions } ,
@@ -25,6 +26,7 @@ const commands = [
25
26
{ cmd : 'npm' , args : [ 'run' , 'test:client' ] , cwd : 'test-project' } ,
26
27
{ cmd : 'npm' , args : [ 'run' , 'build' ] , cwd : 'test-project' } ,
27
28
] ;
29
+ /* eslint-enable max-len */
28
30
29
31
function executeCommand ( command , index ) {
30
32
return new Promise ( ( resolve , reject ) => {
@@ -80,8 +82,12 @@ function executeCommand(command, index) {
80
82
} ) ;
81
83
}
82
84
83
- commands . reduce ( ( prev , next , index ) => prev . then ( ( ) => executeCommand ( next , index )
84
- . catch ( ( code ) => {
85
- console . log ( 'child process exit with' , code ) ;
86
- if ( ! next . ignoreErrors ) process . exit ( code ) ;
87
- } ) ) , Promise . resolve ( ) ) ;
85
+ commands . reduce (
86
+ ( prev , next , index ) =>
87
+ prev . then ( ( ) =>
88
+ executeCommand ( next , index ) . catch ( ( code ) => {
89
+ console . log ( 'child process exit with' , code ) ;
90
+ if ( ! next . ignoreErrors ) process . exit ( code ) ;
91
+ } ) ) ,
92
+ Promise . resolve ( )
93
+ ) ;
0 commit comments