(config: Config, platformName: string, buildOptions: BuildCommandOptions)
| 67 | } |
| 68 | |
| 69 | export async function build(config: Config, platformName: string, buildOptions: BuildCommandOptions): Promise<void> { |
| 70 | if (platformName == config.ios.name) { |
| 71 | await buildiOS(config, buildOptions); |
| 72 | } else if (platformName === config.android.name) { |
| 73 | await buildAndroid(config, buildOptions); |
| 74 | } else if (platformName === config.web.name) { |
| 75 | throw `Platform "${platformName}" is not available in the build command.`; |
| 76 | } else { |
| 77 | throw `Platform "${platformName}" is not valid.`; |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | function createBuildablePlatformFilter(config: Config): (platform: string) => boolean { |
| 82 | return (platform) => platform === config.ios.name || platform === config.android.name; |
no test coverage detected