Skip to content

Commit 2ee4568

Browse files
author
Vladimir Enchev
committed
deployOnEmulator() will call deployOnDevice()
with this.$options.emulator = true;
1 parent cac997e commit 2ee4568

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

lib/services/platform-service.ts

+2-22
Original file line numberDiff line numberDiff line change
@@ -482,28 +482,8 @@ export class PlatformService implements IPlatformService {
482482
}
483483

484484
public deployOnEmulator(platform: string, buildConfig?: IBuildConfig): IFuture<void> {
485-
return (() => {
486-
let packageFile: string, logFilePath: string;
487-
this.ensurePlatformInstalled(platform).wait();
488-
platform = platform.toLowerCase();
489-
490-
let platformData = this.$platformsData.getPlatformData(platform);
491-
let emulatorServices = platformData.emulatorServices;
492-
493-
emulatorServices.checkAvailability().wait();
494-
emulatorServices.checkDependencies().wait();
495-
496-
if (!this.$options.availableDevices) {
497-
this.buildPlatform(platform, buildConfig).wait();
498-
499-
packageFile = this.getLatestApplicationPackageForEmulator(platformData).wait().packageName;
500-
this.$logger.out("Using ", packageFile);
501-
502-
logFilePath = path.join(platformData.projectRoot, this.$projectData.projectName, "emulator.log");
503-
}
504-
505-
emulatorServices.runApplicationOnEmulator(packageFile, { stderrFilePath: logFilePath, stdoutFilePath: logFilePath, appId: this.$projectData.projectId }).wait();
506-
}).future<void>()();
485+
this.$options.emulator = true;
486+
return this.deployOnDevice(platform, buildConfig);
507487
}
508488

509489
public validatePlatform(platform: string): void {

0 commit comments

Comments
 (0)