Skip to content

Commit 083552e

Browse files
committed
Merge pull request #912 from NativeScript/livesync-prepare-once
Don't prepare platform N times if N files have been changed.
2 parents c9b9d3d + 55a4962 commit 083552e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/common

lib/services/usb-livesync-service.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
7878

7979
let beforeBatchLiveSyncAction = (filePath: string): IFuture<string> => {
8080
return (() => {
81-
this.$platformService.preparePlatform(platform).wait();
8281
let projectFileInfo = this.getProjectFileInfo(filePath);
8382
return path.join(projectFilesPath, path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME), projectFileInfo.onDeviceName));
8483
}).future<string>()();
@@ -113,6 +112,9 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
113112
}).future<void>()();
114113
}
115114

115+
protected preparePlatformForSync(platform: string) {
116+
this.$platformService.preparePlatform(platform).wait();
117+
}
116118
private resolveUsbLiveSyncService(platform: string, device: Mobile.IDevice): IPlatformSpecificUsbLiveSyncService {
117119
let platformSpecificUsbLiveSyncService: IPlatformSpecificUsbLiveSyncService = null;
118120
if(platform.toLowerCase() === "android") {

0 commit comments

Comments
 (0)