MCPcopy
hub / github.com/ionic-team/capacitor / runNativeRun

Function runNativeRun

cli/src/util/native-run.ts:12–24  ·  view source on GitHub ↗
(args: readonly string[], options: RunCommandOptions = {})

Source from the content-addressed store, hash-verified

10import type { RunCommandOptions } from './subprocess';
11
12export async function runNativeRun(args: readonly string[], options: RunCommandOptions = {}): Promise<string> {
13 const p = resolveNode(__dirname, dirname('native-run/package'), 'bin/native-run');
14
15 if (!p) {
16 fatal(`${c.input('native-run')} not found.`);
17 }
18
19 if (process.versions.pnp) {
20 return await runCommand('yarn', ['node', p, ...args], options);
21 } else {
22 return await runCommand(p, args, options);
23 }
24}
25
26export async function getPlatformTargets(platformName: string): Promise<PlatformTarget[]> {
27 const errors = [];

Callers 3

runAndroidFunction · 0.90
runIOSFunction · 0.90
getPlatformTargetsFunction · 0.85

Calls 3

resolveNodeFunction · 0.90
fatalFunction · 0.90
runCommandFunction · 0.90

Tested by

no test coverage detected