Skip to content

Enable live edit on typescript projects #2018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/services/livesync/ios-device-livesync-service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as helpers from "../../common/helpers";
import * as constants from "../../constants";
import * as minimatch from "minimatch";
import * as net from "net";
import Future = require("fibers/future");

Expand Down Expand Up @@ -75,8 +77,11 @@ class IOSLiveSyncService implements IDeviceLiveSyncService {
this.restartApplication(deviceAppData).wait();
return;
}
let scriptRelatedFiles: Mobile.ILocalToDevicePathData[] = [];
let scriptFiles = _.filter(localToDevicePaths, localToDevicePath => _.endsWith(localToDevicePath.getDevicePath(), ".js"));
let otherFiles = _.difference(localToDevicePaths, scriptFiles);
constants.LIVESYNC_EXCLUDED_FILE_PATTERNS.forEach(pattern => scriptRelatedFiles = _.concat(scriptRelatedFiles, localToDevicePaths.filter(file => minimatch(file.getDevicePath(), pattern, { nocase: true }))));

let otherFiles = _.difference(localToDevicePaths, _.concat(scriptFiles, scriptRelatedFiles));
let shouldRestart = _.some(otherFiles, (localToDevicePath: Mobile.ILocalToDevicePathData) => !this.$liveSyncProvider.canExecuteFastSync(localToDevicePath.getLocalPath(), deviceAppData.platform));

if (shouldRestart) {
Expand Down