Skip to content

Commit 3faf66e

Browse files
committed
fix(prepare): consider app_resources's dir name when preparing in platforms/
1 parent c640f95 commit 3faf66e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/services/platform-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export class PlatformService extends EventEmitter implements IPlatformService {
315315
}
316316

317317
const directoryPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME);
318-
const excludedDirs = [constants.APP_RESOURCES_FOLDER_NAME];
318+
const excludedDirs = [path.basename(projectData.appResourcesDirectoryPath)];
319319
if (!changesInfo || !changesInfo.modulesChanged) {
320320
excludedDirs.push(constants.TNS_MODULES_FOLDER_NAME);
321321
}

lib/services/prepare-platform-js-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export class PreparePlatformJSService extends PreparePlatformService implements
4242
if (config.changesInfo && !config.changesInfo.changesRequirePrepare) {
4343
// remove the App_Resources folder from the app/assets as here we're applying other files changes.
4444
const appDestinationDirectoryPath = path.join(config.platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME);
45-
const appResourcesDirectoryPath = path.join(appDestinationDirectoryPath, constants.APP_RESOURCES_FOLDER_NAME);
45+
const appResourcesDirectoryPath = path.join(appDestinationDirectoryPath, path.basename(config.projectData.appResourcesDirectoryPath));
4646
if (this.$fs.exists(appResourcesDirectoryPath)) {
4747
this.$fs.deleteDirectory(appResourcesDirectoryPath);
4848
}

lib/services/prepare-platform-native-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export class PreparePlatformNativeService extends PreparePlatformService impleme
6262

6363
private copyAppResources(platformData: IPlatformData, projectData: IProjectData): void {
6464
const appDestinationDirectoryPath = path.join(platformData.appDestinationDirectoryPath, constants.APP_FOLDER_NAME);
65-
const appResourcesDirectoryPath = path.join(appDestinationDirectoryPath, constants.APP_RESOURCES_FOLDER_NAME);
65+
const appResourcesDirectoryPath = path.join(appDestinationDirectoryPath, path.basename(projectData.appResourcesDirectoryPath));
6666
if (this.$fs.exists(appResourcesDirectoryPath)) {
6767
platformData.platformProjectService.prepareAppResources(appResourcesDirectoryPath, projectData);
6868
const appResourcesDestination = platformData.platformProjectService.getAppResourcesDestinationDirectoryPath(projectData);

0 commit comments

Comments
 (0)