@@ -89,16 +89,16 @@ module.exports = function(
89
89
) ;
90
90
91
91
let command ;
92
- let args ;
92
+ let depArgs ;
93
93
94
94
if ( useYarn ) {
95
95
command = 'yarnpkg' ;
96
- args = [ 'add' ] ;
96
+ depArgs = [ 'add' ] ;
97
97
} else {
98
98
command = 'npm' ;
99
- args = [ 'install' , '--save' , verbose && '--verbose' ] . filter ( e => e ) ;
99
+ depArgs = [ 'install' , '--save' , verbose && '--verbose' ] . filter ( e => e ) ;
100
100
}
101
- args . push ( 'react' , 'react-dom' ) ;
101
+ depArgs . push ( 'react' , 'react-dom' ) ;
102
102
103
103
// Install additional template dependencies, if present
104
104
const templateDependenciesPath = path . join (
@@ -107,7 +107,7 @@ module.exports = function(
107
107
) ;
108
108
if ( fs . existsSync ( templateDependenciesPath ) ) {
109
109
const templateDependencies = require ( templateDependenciesPath ) . dependencies ;
110
- args = args . concat (
110
+ depArgs = depArgs . concat (
111
111
Object . keys ( templateDependencies ) . map ( key => {
112
112
return `${ key } @${ templateDependencies [ key ] } ` ;
113
113
} )
@@ -122,9 +122,9 @@ module.exports = function(
122
122
console . log ( `Installing react and react-dom using ${ command } ...` ) ;
123
123
console . log ( ) ;
124
124
125
- const proc = spawn . sync ( command , args , { stdio : 'inherit' } ) ;
125
+ const proc = spawn . sync ( command , depArgs , { stdio : 'inherit' } ) ;
126
126
if ( proc . status !== 0 ) {
127
- console . error ( `\`${ command } ${ args . join ( ' ' ) } \` failed` ) ;
127
+ console . error ( `\`${ command } ${ depArgs . join ( ' ' ) } \` failed` ) ;
128
128
return ;
129
129
}
130
130
}
0 commit comments