UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

26 lines (24 loc) 582 B
import "../../chunks/chunk-U5RRZUYZ.js"; // src/cli/util/FindConfigFile.ts import fs from "node:fs"; import path from "node:path"; var defaultLocations = [ "alinea.config", "src/alinea.config", "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 };