@@ -10,6 +10,7 @@ export class LiveSyncProvider implements ILiveSyncProvider {
1010 private $platformsData : IPlatformsData ,
1111 private $logger : ILogger ,
1212 private $childProcess : IChildProcess ,
13+ private $options : IOptions ,
1314 private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ) { }
1415
1516 private static FAST_SYNC_FILE_EXTENSIONS = [ ".css" , ".xml" , ".html" ] ;
@@ -88,7 +89,12 @@ export class LiveSyncProvider implements ILiveSyncProvider {
8889 temp . track ( ) ;
8990 let tempZip = temp . path ( { prefix : "sync" , suffix : ".zip" } ) ;
9091 this . $logger . trace ( "Creating zip file: " + tempZip ) ;
91- this . $childProcess . spawnFromEvent ( "zip" , [ "-r" , "-0" , tempZip , "app" , "-x" , "app/tns_modules/*" ] , "close" , { cwd : path . dirname ( projectFilesPath ) } ) . wait ( ) ;
92+
93+ if ( this . $options . syncAllFiles ) {
94+ this . $childProcess . spawnFromEvent ( "zip" , [ "-r" , "-0" , tempZip , "app" ] , "close" , { cwd : path . dirname ( projectFilesPath ) } ) . wait ( ) ;
95+ } else {
96+ this . $childProcess . spawnFromEvent ( "zip" , [ "-r" , "-0" , tempZip , "app" , "-x" , "app/tns_modules/*" ] , "close" , { cwd : path . dirname ( projectFilesPath ) } ) . wait ( ) ;
97+ }
9298
9399 deviceAppData . device . fileSystem . transferFiles ( deviceAppData , [ {
94100 getLocalPath : ( ) => tempZip ,
0 commit comments