(config: Config, plugins: Plugin[])
| 39 | } |
| 40 | |
| 41 | export async function generatePackageFile(config: Config, plugins: Plugin[]): Promise<void> { |
| 42 | const packageSwiftFile = await findPackageSwiftFile(config); |
| 43 | try { |
| 44 | logger.info('Writing Package.swift'); |
| 45 | |
| 46 | const textToWrite = await generatePackageText(config, plugins); |
| 47 | writeFileSync(packageSwiftFile, textToWrite); |
| 48 | } catch (err) { |
| 49 | logger.error(`Unable to write to ${packageSwiftFile}. Verify it is not already open. \n Error: ${err}`); |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | export async function checkPluginsForPackageSwift(config: Config, plugins: Plugin[]): Promise<Plugin[]> { |
| 54 | const iOSCapacitorPlugins = plugins.filter((p) => getPluginType(p, 'ios') === PluginType.Core); |
no test coverage detected