@@ -2,7 +2,7 @@ import fs from 'fs-extra';
2
2
import path from 'path' ;
3
3
import https from 'https' ;
4
4
import { spawn } from './spawn' ;
5
- import { ExampleType } from './../index' ;
5
+ import type { ExampleType } from './../index' ;
6
6
7
7
const FILES_TO_DELETE = [
8
8
'__tests__' ,
@@ -108,13 +108,13 @@ export default async function generateExampleApp({
108
108
let args : string [ ] = [ ] ;
109
109
110
110
switch ( type ) {
111
- case ExampleType . Vanilla :
111
+ case 'vanilla' :
112
112
args = vanillaArgs ;
113
113
break ;
114
- case ExampleType . TestApp :
114
+ case 'test-app' :
115
115
args = testAppArgs ;
116
116
break ;
117
- case ExampleType . Expo :
117
+ case 'expo' :
118
118
args = expoArgs ;
119
119
break ;
120
120
}
@@ -149,7 +149,7 @@ export default async function generateExampleApp({
149
149
'build:ios' : `cd ios && xcodebuild -workspace ${ projectName } Example.xcworkspace -scheme ${ projectName } Example -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO` ,
150
150
} ;
151
151
152
- if ( type !== ExampleType . Expo ) {
152
+ if ( type !== 'expo' ) {
153
153
Object . assign ( scripts , SCRIPTS_TO_ADD ) ;
154
154
}
155
155
@@ -160,7 +160,7 @@ export default async function generateExampleApp({
160
160
161
161
Object . assign ( devDependencies , PACKAGES_TO_ADD_DEV ) ;
162
162
163
- if ( type === ExampleType . Expo ) {
163
+ if ( type === 'expo' ) {
164
164
const sdkVersion = dependencies . expo . split ( '.' ) [ 0 ] . replace ( / [ ^ \d ] / , '' ) ;
165
165
166
166
let bundledNativeModules : Record < string , string > ;
@@ -204,7 +204,7 @@ export default async function generateExampleApp({
204
204
spaces : 2 ,
205
205
} ) ;
206
206
207
- if ( type !== ExampleType . Expo ) {
207
+ if ( type !== 'expo' ) {
208
208
let gradleProperties = await fs . readFile (
209
209
path . join ( directory , 'android' , 'gradle.properties' ) ,
210
210
'utf8'
0 commit comments