@@ -55,24 +55,24 @@ function userHasYarn() {
5555}
5656
5757// This decides the 'interface' of the package managing command.
58- // Ex: If it guesses the type of package manager as 'yarn',
58+ // Ex: If it guesses the type of package manager as 'yarn',
5959// then it executes '(yarn) add' command instead of '(npm) install'.
6060function packageManagerType ( ) {
6161 const defaultType = 'npm' ;
6262 const supportedTypes = [ 'yarn' , 'npm' ] ;
6363
6464 if ( packageManager ) {
6565 let t = supportedTypes . find ( type => {
66- return ( packageManager . indexOf ( type ) > - 1 ) ;
67- } )
66+ return packageManager . indexOf ( type ) > - 1 ;
67+ } ) ;
6868 return t ? t : defaultType ;
6969 }
7070
7171 return userHasYarn ( ) ? 'yarn' : defaultType ;
7272}
7373
7474function packageManagerCmd ( ) {
75- if ( packageManager ) {
75+ if ( packageManager ) {
7676 return packageManager ;
7777 } else {
7878 return packageManagerType ( ) === 'yarn' ? 'yarnpkg' : 'npm' ;
@@ -105,7 +105,9 @@ async function createApp(name: string, verbose: boolean, version: ?string): Prom
105105 await fse . writeFile ( path . join ( root , 'package.json' ) , JSON . stringify ( packageJson , null , 2 ) ) ;
106106 process . chdir ( root ) ;
107107
108- console . log ( `Using package manager as ${ packageManagerCmd ( ) } with ${ packageManagerType ( ) } interface.` )
108+ console . log (
109+ `Using package manager as ${ packageManagerCmd ( ) } with ${ packageManagerType ( ) } interface.`
110+ ) ;
109111 console . log ( 'Installing packages. This might take a couple minutes.' ) ;
110112 console . log ( 'Installing react-native-scripts...' ) ;
111113 console . log ( ) ;
@@ -122,7 +124,7 @@ function install(
122124 let args , result ;
123125 let cmd = packageManagerCmd ( ) ;
124126
125- if ( type === 'yarn' ) {
127+ if ( type === 'yarn' ) {
126128 args = [ 'add' ] ;
127129
128130 if ( verbose ) {
0 commit comments