Skip to content

Commit d289361

Browse files
FatmeFatme
Fatme
authored and
Fatme
committed
Merge pull request #778 from NativeScript/fatme/fix-nested-folders-livesync
Fix livesync ios --emulator --watch if the file is not at project root level
2 parents f6e2dc5 + 32d474f commit d289361

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

lib/services/usb-livesync-service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,14 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
8787
return Future.fromResult();
8888
}
8989

90+
let iOSSimulatorRelativeToProjectBasePathAction = (projectFile: string): string => {
91+
return path.join(constants.APP_FOLDER_NAME, path.dirname(projectFile.split(`/${constants.APP_FOLDER_NAME}/`)[1]));
92+
}
93+
9094
let watchGlob = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME);
9195
let localProjectRootPath = platform.toLowerCase() === "ios" ? platformData.appDestinationDirectoryPath : null;
9296

93-
this.sync(platform, this.$projectData.projectId, projectFilesPath, this.excludedProjectDirsAndFiles, watchGlob, restartAppOnDeviceAction, notInstalledAppOnDeviceAction, notRunningiOSSimulatorAction, localProjectRootPath, beforeLiveSyncAction, beforeBatchLiveSyncAction).wait();
97+
this.sync(platform, this.$projectData.projectId, projectFilesPath, this.excludedProjectDirsAndFiles, watchGlob, restartAppOnDeviceAction, notInstalledAppOnDeviceAction, notRunningiOSSimulatorAction, localProjectRootPath, beforeLiveSyncAction, beforeBatchLiveSyncAction, iOSSimulatorRelativeToProjectBasePathAction).wait();
9498
}).future<void>()();
9599
}
96100

0 commit comments

Comments
 (0)