@@ -10,6 +10,7 @@ export class LiveSyncProvider implements ILiveSyncProvider {
10
10
private $platformsData : IPlatformsData ,
11
11
private $logger : ILogger ,
12
12
private $childProcess : IChildProcess ,
13
+ private $options : IOptions ,
13
14
private $devicePlatformsConstants : Mobile . IDevicePlatformsConstants ) { }
14
15
15
16
private static FAST_SYNC_FILE_EXTENSIONS = [ ".css" , ".xml" , ".html" ] ;
@@ -88,7 +89,12 @@ export class LiveSyncProvider implements ILiveSyncProvider {
88
89
temp . track ( ) ;
89
90
let tempZip = temp . path ( { prefix : "sync" , suffix : ".zip" } ) ;
90
91
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
+ }
92
98
93
99
deviceAppData . device . fileSystem . transferFiles ( deviceAppData , [ {
94
100
getLocalPath : ( ) => tempZip ,
0 commit comments