const path = require('path');
const fs = require('fs');

const ROOT = process.cwd();
let _root = '';
let _src = '/src';
let _pages = '/src/pages';
let _static = '/static';
let _config = '';

if (fs.existsSync(path.join(ROOT, 'bl.config.js'))) {
    let blConfig = require(path.join(ROOT, 'bl.config.js'));

    if (blConfig.path) {
        _root = blConfig.path.root || _root;
        _src = blConfig.path.src || _src;
        _pages = blConfig.path.pages || _pages;
        _static = blConfig.path.static || _static;
        _config = blConfig.path.config || _config;
    }
}

module.exports = {
    _root,
    _src,
    _pages,
    _static,
    _config
};