Skip to content

Commit 72d23f9

Browse files
committed
Fix live sync --watch
1 parent 8d1968a commit 72d23f9

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/services/usb-livesync-service.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ export class UsbLiveSyncService extends usbLivesyncServiceBaseLib.UsbLiveSyncSer
4545
return this.$platformService.deployOnDevice(platform);
4646
}
4747

48-
let beforeBatchLiveSyncAction = (filePath: string): IFuture<void> => {
48+
let beforeBatchLiveSyncAction = (filePath: string): IFuture<string> => {
4949
return (() => {
50-
if(filePath.indexOf("node_modules") !== -1) {
51-
this.$platformService.preparePlatform(platform).wait();
52-
}
53-
}).future<void>()();
50+
this.$platformService.preparePlatform(platform).wait();
51+
return path.join(projectFilesPath, path.relative(path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME), filePath));
52+
}).future<string>()();
5453
}
5554

56-
let watchGlob = this.$projectData.projectDir + "/**/*"; //TODO: add node_modules folder
55+
let watchGlob = path.join(this.$projectData.projectDir, constants.APP_FOLDER_NAME) + "/**/*";
5756

5857
this.sync(platform, this.$projectData.projectId, platformData.appDestinationDirectoryPath, projectFilesPath, this.excludedProjectDirsAndFiles, watchGlob, restartAppOnDeviceAction, notInstalledAppOnDeviceAction, beforeBatchLiveSyncAction).wait();
5958
}).future<void>()();

0 commit comments

Comments
 (0)