Example #1
0
module.exports = (dataFile, dataFileDir) => {
    var dataFilePath = (dataFileDir || DEFAULT_DATA_FILES_DIR) + dataFile;

    if (fileExists(dataFilePath)) {
        return fs.readFileSync(dataFilePath, 'UTF-8');
    }
    else {
        throw new Error('Data file "' + dataFilePath + '" does not exist');
    }
}
Example #2
0
function isJS(fullConfigPath) {
    return fileExists(fullConfigPath + '.js');
}