UNPKG

alinea

Version:
21 lines (19 loc) 534 B
import "../../chunks/chunk-NZLE2WMY.js"; // src/cli/util/FindConfigFile.ts import fs from "node:fs"; import path from "node:path"; var defaultLocations = ["cms", "src/cms"]; var testExtensions = [".ts", ".tsx", ".js", ".jsx"]; function findConfigFile(cwd) { for (const location of defaultLocations) { for (const extension of testExtensions) { const testLocation = path.join(cwd, location + extension); if (fs.existsSync(testLocation)) { return testLocation; } } } } export { findConfigFile };