import {join} from "path"; import {existsSync} from "fs"; export interface Config { src: string; meta: { name: string, summary: string, authors: string[] }; ext: { styles: string, templates: string, scripts: string }; template: string; colors: string[]; fonts: string[]; globals: { stylesheets: string[], javascripts: string[] }; } export function getConfig(): Config { const configFile: string = join(process.cwd(), 'pops.config.js'); if (existsSync(configFile)) { return require(configFile); } else { throw new Error('pops.config.js not found in current directory'); } }