MCPcopy Index your code
hub / github.com/ionic-team/capacitor / copyCapacitorConfig

Function copyCapacitorConfig

cli/src/tasks/copy.ts:154–166  ·  view source on GitHub ↗
(config: Config, nativeAbsDir: string)

Source from the content-addressed store, hash-verified

152}
153
154async function copyCapacitorConfig(config: Config, nativeAbsDir: string) {
155 const nativeRelDir = relative(config.app.rootDir, nativeAbsDir);
156 const nativeConfigFile = 'capacitor.config.json';
157 const nativeConfigFilePath = join(nativeAbsDir, nativeConfigFile);
158
159 await runTask(`Creating ${c.strong(nativeConfigFile)} in ${nativeRelDir}`, async () => {
160 delete (config.app.extConfig.android as any)?.buildOptions;
161 delete (config.app.extConfig.ios as any)?.buildOptions;
162 await writeJSON(nativeConfigFilePath, config.app.extConfig, {
163 spaces: '\t',
164 });
165 });
166}
167
168async function copyWebDir(config: Config, nativeAbsDir: string, webAbsDir: string) {
169 const webRelDir = basename(webAbsDir);

Callers 1

copyFunction · 0.85

Calls 2

runTaskFunction · 0.90
writeJSONFunction · 0.85

Tested by

no test coverage detected