10000 Respect --bundle option in run command by Mitko-Kerezov · Pull Request #3260 · NativeScript/nativescript-cli · GitHub
[go: up one dir, main page]

Skip to content

Respect --bundle option in run command #3260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions PublicAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ const liveSyncData = {
projectDir,
skipWatcher: false,
watchAllFiles: false,
bundle: false,
release: false,
useLiveEdit: false
};

Expand Down
4 changes: 2 additions & 2 deletions lib/definitions/livesync.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ interface ILiveSyncDeviceInfo extends IOptionalOutputPath, IOptionalDebuggingOpt
/**
* Describes a LiveSync operation.
*/
interface ILiveSyncInfo extends IProjectDir, IEnvOptions {
interface ILiveSyncInfo extends IProjectDir, IEnvOptions, IBundle, IRelease {
/**
* Defines if the watcher should be skipped. If not passed, fs.Watcher will be started.
*/
Expand Down Expand Up @@ -152,7 +152,7 @@ interface IProjectDataComposition {
/**
* Desribes object that can be passed to ensureLatestAppPackageIsInstalledOnDevice method.
*/
interface IEnsureLatestAppPackageIsInstalledOnDeviceOptions extends IProjectDataComposition, IEnvOptions {
interface IEnsureLatestAppPackageIsInstalledOnDeviceOptions extends IProjectDataComposition, IEnvOptions, IBundle, IRelease {
device: Mobile.IDevice;
preparedPlatforms: string[];
rebuiltInformation: ILiveSyncBuildInfo[];
Expand Down
5 changes: 3 additions & 2 deletions lib/services/livesync/livesync-command-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
this.$iosDeviceOperations.setShouldDispose(false);
}

if (this.$options.release || this.$options.bundle) {
if (this.$options.release) {
await this.runInReleaseMode(platform);
return;
}
Expand Down Expand Up @@ -75,11 +75,12 @@ export class LiveSyncCommandHelper implements ILiveSyncCommandHelper {
skipWatcher: !this.$options.watch,
watchAllFiles: this.$options.syncAllFiles,
clean: this.$options.clean,
bundle: !!this.$options.bundle,
release: this.$options.release,
env: this.$options.env
};

await this.$liveSyncService.liveSync(deviceDescriptors, liveSyncInfo);

}

private async runInReleaseMode(platform: string): Promise<void> {
Expand Down
8 changes: 6 additions & 2 deletions lib/services/livesync/livesync-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,8 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
const prepareInfo: IPreparePlatformInfo = {
platform,
appFilesUpdaterOptions: {
bundle: false,
release: false,
bundle: options.bundle,
release: options.release,
},
projectData: options.projectData,
env: options.env,
Expand Down Expand Up @@ -459,6 +459,8 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
deviceBuildInfoDescriptor,
liveSyncData,
settings,
bundle: liveSyncData.bundle,
release: liveSyncData.release,
env: liveSyncData.env
}, { skipNativePrepare: deviceBuildInfoDescriptor.skipNativePrepare });

Expand Down Expand Up @@ -564,6 +566,8 @@ export class LiveSyncService extends EventEmitter implements IDebugLiveSyncServi
deviceBuildInfoDescriptor,
settings: latestAppPackageInstalledSettings,
modifiedFiles: allModifiedFiles,
bundle: liveSyncData.bundle,
release: liveSyncData.release,
env: liveSyncData.env
}, { skipNativePrepare: deviceBuildInfoDescriptor.skipNativePrepare });

Expand Down
4 changes: 4 additions & 0 deletions lib/services/test-execution-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ class TestExecutionService implements ITestExecutionService {
projectDir: projectData.projectDir,
skipWatcher: !this.$options.watch || this.$options.justlaunch,
watchAllFiles: this.$options.syncAllFiles,
bundle: !!this.$options.bundle,
release: this.$options.release,
env: this.$options.env
};

Expand Down Expand Up @@ -248,6 +250,8 @@ class TestExecutionService implements ITestExecutionService {
projectDir: projectData.projectDir,
skipWatcher: !this.$options.watch || this.$options.justlaunch,
watchAllFiles: this.$options.syncAllFiles,
bundle: !!this.$options.bundle,
release: this.$options.release,
env: this.$options.env
};

Expand Down
0