@@ -7,6 +7,7 @@ export class LiveSyncProvider implements ILiveSyncProvider {
7
7
private $platformService : IPlatformService ,
8
8
private $platformsData : IPlatformsData ,
9
9
private $logger : ILogger ,
10
+ private $options : IOptions ,
10
11
private $childProcess : IChildProcess ) { }
11
12
12
13
private static FAST_SYNC_FILE_EXTENSIONS = [ ".css" , ".xml" , ".html" ] ;
@@ -65,7 +66,12 @@ export class LiveSyncProvider implements ILiveSyncProvider {
65
66
temp . track ( ) ;
66
67
let tempZip = temp . path ( { prefix : "sync" , suffix : ".zip" } ) ;
67
68
this . $logger . trace ( "Creating zip file: " + tempZip ) ;
68
- this . $childProcess . spawnFromEvent ( "zip" , [ "-r" , "-0" , tempZip , "app" ] , "close" , { cwd : path . dirname ( projectFilesPath ) } ) . wait ( ) ;
69
+
70
+ if ( this . $options . syncAllFiles ) {
71
+ this . $childProcess . spawnFromEvent ( "zip" , [ "-r" , "-0" , tempZip , "app" ] , "close" , { cwd : path . dirname ( projectFilesPath ) } ) . wait ( ) ;
72
+ } else {
73
+ this . $childProcess . spawnFromEvent ( "zip" , [ "-r" , "-0" , tempZip , "app" , "-x" , "app/tns_modules/*" ] , "close" , { cwd : path . dirname ( projectFilesPath ) } ) . wait ( ) ;
74
+ }
69
75
70
76
deviceAppData . device . fileSystem . transferFiles ( deviceAppData , [ {
71
77
getLocalPath : ( ) => tempZip ,
0 commit comments