Initial commit from Astro

This commit is contained in:
houston[bot]
2025-07-09 17:31:27 +03:00
committed by Buğra
commit bb8eda4ece
144 changed files with 22120 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
import fs from 'node:fs';
import yaml from 'js-yaml';
const loadConfig = async (configPathOrData: string | object) => {
if (typeof configPathOrData === 'string') {
const content = fs.readFileSync(configPathOrData, 'utf8');
if (configPathOrData.endsWith('.yaml') || configPathOrData.endsWith('.yml')) {
return yaml.load(content);
}
return content;
}
return configPathOrData;
};
export default loadConfig;