mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 20:55:30 +02:00
Missing config_util.js
This commit is contained in:
parent
8a8b00559b
commit
ea820dbbbb
1 changed files with 19 additions and 0 deletions
19
core/config_util.js
Normal file
19
core/config_util.js
Normal 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);
|
||||||
|
});
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue