From b82363938e25be0e301cdbf24759619b97408c52 Mon Sep 17 00:00:00 2001 From: fatme Date: Wed, 28 Feb 2018 13:58:18 +0200 Subject: [PATCH] Use moduleResolution classic when syncAllFiles option is not specified --- lib/declarations.d.ts | 2 +- lib/definitions/platform.d.ts | 4 ++++ lib/services/livesync/livesync-service.ts | 5 ++++- lib/services/platform-service.ts | 11 ++++++++++- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/declarations.d.ts b/lib/declarations.d.ts index be53399b4e..9a9b36bc4b 100644 --- a/lib/declarations.d.ts +++ b/lib/declarations.d.ts @@ -471,7 +471,7 @@ interface IEnvOptions { interface IAndroidBuildOptionsSettings extends IAndroidReleaseOptions, IRelease { } -interface IAppFilesUpdaterOptions extends IBundle, IRelease { } +interface IAppFilesUpdaterOptions extends IBundle, IRelease, IOptionalWatchAllFiles { } interface IPlatformBuildData extends IAppFilesUpdaterOptions, IBuildConfig, IEnvOptions { } diff --git a/lib/definitions/platform.d.ts b/lib/definitions/platform.d.ts index 3edeb6af49..c8cea1207e 100644 --- a/lib/definitions/platform.d.ts +++ b/lib/definitions/platform.d.ts @@ -358,6 +358,10 @@ interface IOptionalNativePrepareComposition { nativePrepare?: INativePrepare; } +interface IOptionalWatchAllFiles { + watchAllFiles?: boolean; +} + interface IDeployPlatformInfo extends IPlatform, IAppFilesUpdaterOptionsComposition, IProjectDataComposition, IPlatformConfig, IEnvOptions, IOptionalNativePrepareComposition, IOptionalOutputPath, IBuildPlatformAction { deployOptions: IDeployPlatformOptions } diff --git a/lib/services/livesync/livesync-service.ts b/lib/services/livesync/livesync-service.ts index da16aea9fc..7182bdb747 100644 --- a/lib/services/livesync/livesync-service.ts +++ b/lib/services/livesync/livesync-service.ts @@ -373,6 +373,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi appFilesUpdaterOptions: { bundle: options.bundle, release: options.release, + watchAllFiles: options.liveSyncData.watchAllFiles }, projectData: options.projectData, env: options.env, @@ -577,6 +578,7 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi rebuiltInformation, projectData, deviceBuildInfoDescriptor, + liveSyncData, settings: latestAppPackageInstalledSettings, modifiedFiles: allModifiedFiles, filesToRemove: currentFilesToRemove, @@ -637,7 +639,8 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi env: liveSyncData.env, appFilesUpdaterOptions: { bundle: liveSyncData.bundle, - release: liveSyncData.release + release: liveSyncData.release, + watchAllFiles: liveSyncData.watchAllFiles }, platforms }, diff --git a/lib/services/platform-service.ts b/lib/services/platform-service.ts index 0eaea50425..cc4a1292df 100644 --- a/lib/services/platform-service.ts +++ b/lib/services/platform-service.ts @@ -282,7 +282,16 @@ export class PlatformService extends EventEmitter implements IPlatformService { /* Hooks are expected to use "filesToSync" parameter, as to give plugin authors additional information about the sync process.*/ @helpers.hook('prepare') - private async preparePlatformCore(platform: string, appFilesUpdaterOptions: IAppFilesUpdaterOptions, projectData: IProjectData, platformSpecificData: IPlatformSpecificData, env: Object, changesInfo?: IProjectChangesInfo, filesToSync?: string[], filesToRemove?: string[], nativePrepare?: INativePrepare): Promise { + private async preparePlatformCore(platform: string, + appFilesUpdaterOptions: IAppFilesUpdaterOptions, + projectData: IProjectData, + platformSpecificData: IPlatformSpecificData, + env: Object, + changesInfo?: IProjectChangesInfo, + filesToSync?: string[], + filesToRemove?: string[], + nativePrepare?: INativePrepare): Promise { + this.$logger.out("Preparing project..."); const platformData = this.$platformsData.getPlatformData(platform, projectData);