lib/config/index.js
function getFileContent(ext, file) {
    var conf = {};
    switch (ext) {
        case '.js':
            conf = require(file);
            break;
        case '.json':
            conf = JSON.parse(fs.readFileSync(file, {
                encoding: 'utf-8'
            }));
            break;
        case '.yml':
            conf = yaml.safeLoad(fs.readFileSync(file, {
                encoding: 'utf-8'
            }));
            break;
    }

    return conf;
}
function getFileContent(ext, file) {
    var conf = {};
    switch (ext) {
        case '.js':
            conf = require(file);
            break;
        case '.json':
            conf = JSON.parse(fs.readFileSync(file, {
                encoding: 'utf-8'
            }));
            break;
        case '.yml':
            conf = yaml.safeLoad(fs.readFileSync(file, {
                encoding: 'utf-8'
            }));
            break;
    }

    return conf;
}
function getFileContent ( ext , file ) { var conf = { } ; switch ( ext ) { case '.js' : conf = require ( file ) ; break ; case '.json' : conf = JSON . parse ( fs . readFileSync ( file , { encoding : 'utf-8' } ) ) ; break ; case '.yml' : conf = yaml . safeLoad ( fs . readFileSync ( file , { encoding : 'utf-8' } ) ) ; break ; } return conf ; }
Get file content
Get file content