File tree 2 files changed +5
-13
lines changed
2 files changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ interface IPlatformData {
11
11
frameworkPackageName : string ;
12
12
platformProjectService : IPlatformSpecificProjectService ;
13
13
projectRoot : string ;
14
+ normalizedPlatformName : string ;
14
15
targetedOS ?: string [ ] ;
15
16
}
16
17
Original file line number Diff line number Diff line change @@ -9,12 +9,14 @@ class PlatformsData implements IPlatformsData {
9
9
ios : {
10
10
frameworkPackageName : "tns-ios" ,
11
11
platformProjectService : $injector . resolve ( "iOSProjectService" ) ,
12
+ normalizedPlatformName : "iOS" ,
12
13
projectRoot : "" ,
13
14
targetedOS : [ 'darwin' ]
14
15
} ,
15
16
android : {
16
17
frameworkPackageName : "tns-android" ,
17
18
platformProjectService : $injector . resolve ( "androidProjectService" ) ,
19
+ normalizedPlatformName : "Android" ,
18
20
projectRoot : ""
19
21
}
20
22
} ;
@@ -111,9 +113,9 @@ export class PlatformService implements IPlatformService {
111
113
return ( ( ) => {
112
114
platform = platform . toLowerCase ( ) ;
113
115
this . validatePlatform ( platform ) ;
114
- var normalizedPlatformName = this . normalizePlatformName ( platform ) ;
115
116
116
- this . $platformProjectService . prepareProject ( normalizedPlatformName , this . $platformsData . platformsNames ) . wait ( ) ;
117
+ this . $platformProjectService . prepareProject ( this . $platformsData . getPlatformData ( platform ) . normalizedPlatformName ,
118
+ this . $platformsData . platformsNames ) . wait ( ) ;
117
119
} ) . future < void > ( ) ( ) ;
118
120
}
119
121
@@ -149,16 +151,5 @@ export class PlatformService implements IPlatformService {
149
151
150
152
return false ;
151
153
}
152
-
153
- private normalizePlatformName ( platform : string ) : string {
154
- switch ( platform ) {
155
- case "android" :
156
- return "Android" ;
157
- case "ios" :
158
- return "iOS" ;
159
- }
160
-
161
- return undefined ;
162
- }
163
154
}
164
155
$injector . register ( "platformService" , PlatformService ) ;
You can’t perform that action at this time.
0 commit comments