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

Function loadExtConfigJS

cli/src/config.ts:134–149  ·  view source on GitHub ↗
(
  rootDir: string,
  extConfigName: string,
  extConfigFilePath: string,
)

Source from the content-addressed store, hash-verified

132}
133
134async function loadExtConfigJS(
135 rootDir: string,
136 extConfigName: string,
137 extConfigFilePath: string,
138): Promise<ExtConfigPairs> {
139 try {
140 return {
141 extConfigType: 'js',
142 extConfigName,
143 extConfigFilePath: extConfigFilePath,
144 extConfig: await require(extConfigFilePath),
145 };
146 } catch (e: any) {
147 fatal(`Parsing ${c.strong(extConfigName)} failed.\n\n${e.stack ?? e}`);
148 }
149}
150
151async function loadExtConfig(rootDir: string): Promise<ExtConfigPairs> {
152 const extConfigFilePathTS = resolve(rootDir, CONFIG_FILE_NAME_TS);

Callers 1

loadExtConfigFunction · 0.85

Calls 1

fatalFunction · 0.90

Tested by

no test coverage detected