@@ -39,7 +39,7 @@ class SyncBatch {
39
39
} ) ;
40
40
}
41
41
this . timer = null ;
42
- } , 250 ) ;
42
+ } , 250 ) ; // https://github.com/Microsoft/TypeScript/blob/master/src/compiler/tsc.ts#L487-L489
43
43
}
44
44
45
45
public get syncPending ( ) {
@@ -86,11 +86,11 @@ export class UsbLiveSyncServiceBase implements IUsbLiveSyncServiceBase {
86
86
this . $iOSEmulatorServices . sync ( data . appIdentifier , data . projectFilesPath , data . notRunningiOSSimulatorAction ) . wait ( ) ;
87
87
}
88
88
89
- if ( ! this . _initialized && ( ! this . $options . emulator || data . platform . toLowerCase ( ) === "android" ) ) {
90
- this . initialize ( data . platform ) . wait ( ) ;
91
- }
89
+ if ( ! this . $options . emulator || data . platform . toLowerCase ( ) === "android" ) {
90
+ if ( ! this . _initialized ) {
91
+ this . initialize ( data . platform ) . wait ( ) ;
92
+ }
92
93
93
- if ( ! this . $options . emulator || data . platform . toLowerCase ( ) === "android" ) {
94
94
let projectFiles = this . $fs . enumerateFilesInDirectorySync ( data . projectFilesPath ,
95
95
( filePath , stat ) => ! this . isFileExcluded ( path . relative ( data . projectFilesPath , filePath ) , data . excludedProjectDirsAndFiles , data . projectFilesPath ) ,
96
96
{ enumerateDirectories : true }
@@ -106,15 +106,15 @@ export class UsbLiveSyncServiceBase implements IUsbLiveSyncServiceBase {
106
106
107
107
gaze ( "**/*" , { cwd : data . watchGlob } , function ( err : any , watcher : any ) {
108
108
this . on ( 'all' , ( event : string , filePath : string ) => {
109
- if ( event === "added" || event === "changed" ) {
110
- if ( ! that . isFileExcluded ( filePath , data . excludedProjectDirsAndFiles , data . projectFilesPath ) ) {
109
+ if ( event === "added" || event === "changed" ) {
110
+ if ( ! that . isFileExcluded ( filePath , data . excludedProjectDirsAndFiles , data . projectFilesPath ) ) {
111
111
let canExecuteFastLiveSync = data . canExecuteFastLiveSync && data . canExecuteFastLiveSync ( filePath ) ;
112
112
113
- if ( synciOSSimulator && ! canExecuteFastLiveSync ) {
113
+ if ( synciOSSimulator && ! canExecuteFastLiveSync ) {
114
114
that . batchSimulatorLiveSync ( data , filePath ) ;
115
115
}
116
116
117
- if ( ( ! that . $options . emulator || data . platform . toLowerCase ( ) === "android" ) && ! canExecuteFastLiveSync ) {
117
+ if ( ( ! that . $options . emulator || data . platform . toLowerCase ( ) === "android" ) && ! canExecuteFastLiveSync ) {
118
118
that . batchLiveSync ( data , filePath ) ;
119
119
}
120
120
0 commit comments