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

Function run

cli/src/tasks/run.ts:131–141  ·  view source on GitHub ↗
(config: Config, platformName: string, options: RunCommandOptions)

Source from the content-addressed store, hash-verified

129}
130
131export async function run(config: Config, platformName: string, options: RunCommandOptions): Promise<void> {
132 if (platformName == config.ios.name) {
133 await runIOS(config, options);
134 } else if (platformName === config.android.name) {
135 await runAndroid(config, options);
136 } else if (platformName === config.web.name) {
137 return;
138 } else {
139 throw `Platform ${platformName} is not valid.`;
140 }
141}
142
143function createRunnablePlatformFilter(config: Config): (platform: string) => boolean {
144 return (platform) => platform === config.ios.name || platform === config.android.name;

Callers 1

runCommandFunction · 0.70

Calls 2

runIOSFunction · 0.90
runAndroidFunction · 0.90

Tested by

no test coverage detected