@@ -7,6 +7,7 @@ export class LiveSyncProvider implements ILiveSyncProvider {
77 private $platformService : IPlatformService ,
88 private $platformsData : IPlatformsData ,
99 private $logger : ILogger ,
10+ private $options : IOptions ,
1011 private $childProcess : IChildProcess ) { }
1112
1213 private static FAST_SYNC_FILE_EXTENSIONS = [ ".css" , ".xml" , ".html" ] ;
@@ -65,7 +66,12 @@ export class LiveSyncProvider implements ILiveSyncProvider {
6566 temp . track ( ) ;
6667 let tempZip = temp . path ( { prefix : "sync" , suffix : ".zip" } ) ;
6768 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+ }
6975
7076 deviceAppData . device . fileSystem . transferFiles ( deviceAppData , [ {
7177 getLocalPath : ( ) => tempZip ,
0 commit comments