@@ -99,6 +99,7 @@ export class ProjectData implements IProjectData {
9999 public podfilePath : string ;
100100 public isShared : boolean ;
101101 public webpackConfigPath : string ;
102+ public bundlerConfigPath : string ;
102103 public initialized : boolean ;
103104
104105 constructor (
@@ -110,7 +111,7 @@ export class ProjectData implements IProjectData {
110111 private $logger : ILogger ,
111112 private $injector : IInjector ,
112113 private $androidResourcesMigrationService : IAndroidResourcesMigrationService ,
113- private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants
114+ private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ,
114115 ) { }
115116
116117 get projectConfig ( ) : IProjectConfigService {
@@ -142,7 +143,7 @@ export class ProjectData implements IProjectData {
142143
143144 public initializeProjectDataFromContent (
144145 packageJsonContent : string ,
145- projectDir ?: string
146+ projectDir ?: string ,
146147 ) : void {
147148 projectDir = projectDir || this . $projectHelper . projectDir || "" ;
148149 this . projectDir = projectDir ;
@@ -157,7 +158,7 @@ export class ProjectData implements IProjectData {
157158 this . $errors . fail (
158159 `The project file ${ this . projectFilePath } is corrupted. ${ EOL } ` +
159160 `Consider restoring an earlier version from your source control or backup.${ EOL } ` +
160- `Additional technical info: ${ err . toString ( ) } `
161+ `Additional technical info: ${ err . toString ( ) } ` ,
161162 ) ;
162163 }
163164
@@ -178,36 +179,40 @@ export class ProjectData implements IProjectData {
178179 this . appDirectoryPath = this . getAppDirectoryPath ( ) ;
179180 this . appResourcesDirectoryPath = this . getAppResourcesDirectoryPath ( ) ;
180181 this . androidManifestPath = this . getPathToAndroidManifest (
181- this . appResourcesDirectoryPath
182+ this . appResourcesDirectoryPath ,
182183 ) ;
183184 this . gradleFilesDirectoryPath = path . join (
184185 this . appResourcesDirectoryPath ,
185- this . $devicePlatformsConstants . Android
186+ this . $devicePlatformsConstants . Android ,
186187 ) ;
187188 this . appGradlePath = path . join (
188189 this . gradleFilesDirectoryPath ,
189- constants . APP_GRADLE_FILE_NAME
190+ constants . APP_GRADLE_FILE_NAME ,
190191 ) ;
191192 this . infoPlistPath = path . join (
192193 this . appResourcesDirectoryPath ,
193194 this . $devicePlatformsConstants . iOS ,
194- constants . INFO_PLIST_FILE_NAME
195+ constants . INFO_PLIST_FILE_NAME ,
195196 ) ;
196197 this . buildXcconfigPath = path . join (
197198 this . appResourcesDirectoryPath ,
198199 this . $devicePlatformsConstants . iOS ,
199- constants . BUILD_XCCONFIG_FILE_NAME
200+ constants . BUILD_XCCONFIG_FILE_NAME ,
200201 ) ;
201202 this . podfilePath = path . join (
202203 this . appResourcesDirectoryPath ,
203204 this . $devicePlatformsConstants . iOS ,
204- constants . PODFILE_NAME
205+ constants . PODFILE_NAME ,
205206 ) ;
206207 this . isShared = ! ! ( this . nsConfig && this . nsConfig . shared ) ;
207208 this . webpackConfigPath =
208209 this . nsConfig && this . nsConfig . webpackConfigPath
209210 ? path . resolve ( this . projectDir , this . nsConfig . webpackConfigPath )
210211 : path . join ( this . projectDir , "webpack.config.js" ) ;
212+ this . bundlerConfigPath =
213+ this . nsConfig && this . nsConfig . bundlerConfigPath
214+ ? path . resolve ( this . projectDir , this . nsConfig . bundlerConfigPath )
215+ : null ;
211216 return ;
212217 }
213218
@@ -217,7 +222,7 @@ export class ProjectData implements IProjectData {
217222 private getPathToAndroidManifest ( appResourcesDir : string ) : string {
218223 const androidDirPath = path . join (
219224 appResourcesDir ,
220- this . $devicePlatformsConstants . Android
225+ this . $devicePlatformsConstants . Android ,
221226 ) ;
222227 const androidManifestDir =
223228 this . $androidResourcesMigrationService . hasMigrated ( appResourcesDir )
@@ -230,13 +235,13 @@ export class ProjectData implements IProjectData {
230235 private errorInvalidProject ( projectDir : string ) : void {
231236 const currentDir = path . resolve ( "." ) ;
232237 this . $logger . trace (
233- `Unable to find project. projectDir: ${ projectDir } , options.path: ${ this . $options . path } , ${ currentDir } `
238+ `Unable to find project. projectDir: ${ projectDir } , options.path: ${ this . $options . path } , ${ currentDir } ` ,
234239 ) ;
235240
236241 // This is the case when no project file found
237242 this . $errors . fail (
238243 "No project found at or above '%s' and neither was a --path specified." ,
239- projectDir || this . $options . path || currentDir
244+ projectDir || this . $options . path || currentDir ,
240245 ) ;
241246 }
242247
@@ -291,7 +296,7 @@ export class ProjectData implements IProjectData {
291296
292297 private resolveToProjectDir (
293298 pathToResolve : string ,
294- projectDir ?: string
299+ projectDir ?: string ,
295300 ) : string {
296301 if ( ! projectDir ) {
297302 projectDir = this . projectDir ;
@@ -306,7 +311,7 @@ export class ProjectData implements IProjectData {
306311
307312 @cache ( )
308313 private initializeProjectIdentifiers (
309- config : INsConfig
314+ config : INsConfig ,
310315 ) : Mobile . IProjectIdentifier {
311316 this . $logger . trace ( `Initializing project identifiers. Config: ` , config ) ;
312317
@@ -341,18 +346,18 @@ export class ProjectData implements IProjectData {
341346 private getProjectType ( ) : string {
342347 let detectedProjectType = _ . find (
343348 ProjectData . PROJECT_TYPES ,
344- ( projectType ) => projectType . isDefaultProjectType
349+ ( projectType ) => projectType . isDefaultProjectType ,
345350 ) . type ;
346351
347352 const deps : string [ ] = _ . keys ( this . dependencies ) . concat (
348- _ . keys ( this . devDependencies )
353+ _ . keys ( this . devDependencies ) ,
349354 ) ;
350355
351356 _ . each ( ProjectData . PROJECT_TYPES , ( projectType ) => {
352357 if (
353358 _ . some (
354359 projectType . requiredDependencies ,
355- ( requiredDependency ) => deps . indexOf ( requiredDependency ) !== - 1
360+ ( requiredDependency ) => deps . indexOf ( requiredDependency ) !== - 1 ,
356361 )
357362 ) {
358363 detectedProjectType = projectType . type ;
@@ -366,7 +371,7 @@ export class ProjectData implements IProjectData {
366371 @cache ( )
367372 private warnProjectId ( ) : void {
368373 this . $logger . warn (
369- "[WARNING]: IProjectData.projectId is deprecated. Please use IProjectData.projectIdentifiers[platform]."
374+ "[WARNING]: IProjectData.projectId is deprecated. Please use IProjectData.projectIdentifiers[platform]." ,
370375 ) ;
371376 }
372377}
0 commit comments