Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs

This commit is contained in:
Bryan Ashby 2016-01-14 22:57:06 -07:00
commit 1f5ccca8fe
1 changed files with 19 additions and 0 deletions

19
core/config_util.js Normal file
View File

@ -0,0 +1,19 @@
/* jslint node: true */
'use strict';
var configCache = require('./config_cache.js');
var paths = require('path');
exports.getFullConfig = getFullConfig;
function getFullConfig(filePath, cb) {
// |filePath| is assumed to be in 'mods' if it's only a file name
if('.' === paths.dirname(filePath)) {
filePath = paths.join(__dirname, '../mods', filePath);
}
configCache.getConfig(filePath, function loaded(err, configJson) {
cb(err, configJson);
});
}