UNPKG

@hv/celestial

Version:

A styleguide for documenting your Astro-components

15 lines 550 B
import path from "node:path"; import fs from "node:fs"; export const CONFIG_NAME = 'celestial.config.json'; export function getConfig() { try { const configFile = fs.readFileSync(path.join(path.resolve(process.cwd()), CONFIG_NAME), { encoding: 'utf-8' }); const config = JSON.parse(configFile); return config && config; } catch (_err) { console.error('Celestial config not found. Create a celestial.config.js file in your project root.'); process.exit(1); } } //# sourceMappingURL=config.js.map