"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompileCommand = void 0; const cli_framework_1 = require("@ionic/cli-framework"); const color_1 = require("../../lib/color"); const utils_1 = require("../../lib/integrations/cordova/utils"); const base_1 = require("./base"); class CompileCommand extends base_1.CordovaCommand { async getMetadata() { return { name: 'compile', type: 'project', summary: 'Compile native platform code', description: ` Like running ${color_1.input('cordova compile')} directly, but provides friendly checks. `, exampleCommands: [ 'ios', 'ios --device', 'android', ], inputs: [ { name: 'platform', summary: `The platform to compile (${['android', 'ios'].map(v => color_1.input(v)).join(', ')})`, validators: [cli_framework_1.validators.required], }, ], options: [ ...base_1.CORDOVA_COMPILE_OPTIONS, ], }; } async preRun(inputs, options, runinfo) { await this.preRunChecks(runinfo); if (!inputs[0]) { const platform = await this.env.prompt({ type: 'input', name: 'platform', message: `What platform would you like to compile (${['android', 'ios'].map(v => color_1.input(v)).join(', ')}):`, }); inputs[0] = platform.trim(); } await this.checkForPlatformInstallation(inputs[0]); } async run(inputs, options) { const metadata = await this.getMetadata(); await this.runCordova(utils_1.filterArgumentsForCordova(metadata, options), { stdio: 'inherit' }); } } exports.CompileCommand = CompileCommand;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
base.d.ts | File | 1021 B | 0644 |
|
base.js | File | 8.52 KB | 0644 |
|
build.d.ts | File | 493 B | 0644 |
|
build.js | File | 4.24 KB | 0644 |
|
compile.d.ts | File | 495 B | 0644 |
|
compile.js | File | 1.87 KB | 0644 |
|
emulate.d.ts | File | 193 B | 0644 |
|
emulate.js | File | 472 B | 0644 |
|
index.d.ts | File | 274 B | 0644 |
|
index.js | File | 2.4 KB | 0644 |
|
platform.d.ts | File | 526 B | 0644 |
|
platform.js | File | 4.92 KB | 0644 |
|
plugin.d.ts | File | 494 B | 0644 |
|
plugin.js | File | 4.13 KB | 0644 |
|
prepare.d.ts | File | 495 B | 0644 |
|
prepare.js | File | 4.88 KB | 0644 |
|
requirements.d.ts | File | 500 B | 0644 |
|
requirements.js | File | 2.07 KB | 0644 |
|
resources.d.ts | File | 323 B | 0644 |
|
resources.js | File | 4.17 KB | 0644 |
|
run.d.ts | File | 808 B | 0644 |
|
run.js | File | 15.22 KB | 0644 |
|