File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -16,23 +16,23 @@ const isYarnAvailable = () => {
16
16
return false ;
17
17
}
18
18
}
19
+ const currPackager = isYarnAvailable ? "yarn" : "npm" ;
20
+ const logInstallingWith = pkg => console . log ( `\n📦 Installing dependencies with ${ pkg } ...\n` ) ;
21
+ const execOptions = {
22
+ stdio : 'inherit'
23
+ }
19
24
20
25
console . log ( '\n🔄 Please wait...\n' ) ;
21
26
22
27
packageJson . scripts . start = `${ packageJson . scripts . start } --config ../../../../rn-cli.config.js` ;
23
28
packageJson . jest = Object . assign ( packageJson . jest , jestJson ) ;
24
29
writeFile ( 'package.json' , JSON . stringify ( packageJson , null , 2 ) ) ;
25
30
26
- const logInstallingWith = pkg => console . log ( `\n📦 Installing dependencies with ${ pkg } ...\n` ) ;
27
- const execOptions = {
28
- stdio : 'inherit'
29
- }
31
+ logInstallingWith ( currPackager ) ;
30
32
31
33
if ( isYarnAvailable ) {
32
- logInstallingWith ( "yarn" ) ;
33
34
execSync ( `yarn add ${ devDependencies . join ( ' ' ) } --dev --exact` , execOptions ) ;
34
35
} else {
35
- logInstallingWith ( "npm" ) ;
36
36
execSync ( `npm i ${ devDependencies . join ( ' ' ) } --save-dev --save-exact` , execOptions ) ;
37
37
}
38
38
@@ -45,4 +45,4 @@ deleteFile('README.md');
45
45
deleteFile ( 'LICENSE' ) ;
46
46
deleteFile ( 'setup.js' ) ;
47
47
48
- console . log ( `\n✅ Setup completed! You can now start with: ${ isYarnAvailable ? "yarn" : "npm" } start\n` ) ;
48
+ console . log ( `\n✅ Setup completed! You can now start with: ${ currPackager } start\n` ) ;
You can’t perform that action at this time.
0 commit comments