MCPcopy Index your code
hub / github.com/rollup/rollup / findConfigFileNameInCwd

Function findConfigFileNameInCwd

cli/run/getConfigPath.ts:31–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31async function findConfigFileNameInCwd(): Promise<string> {
32 const filesInWorkingDirectory = new Set(await readdir(cwd()));
33 for (const extension of ['mjs', 'cjs', 'ts']) {
34 const fileName = `${DEFAULT_CONFIG_BASE}.${extension}`;
35 if (filesInWorkingDirectory.has(fileName)) return fileName;
36 }
37 return `${DEFAULT_CONFIG_BASE}.js`;
38}

Callers 1

getConfigPathFunction · 0.85

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…