mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-10 06:34:41 +02:00
Add Config.general.menuFile: Specify name or path of menu HJSON file. Defaults to menu.hjson in mods
This commit is contained in:
parent
bd4c50fa8d
commit
0d477210f9
2 changed files with 11 additions and 1 deletions
|
@ -31,7 +31,14 @@ function getMenuConfig(name, cb) {
|
|||
async.waterfall(
|
||||
[
|
||||
function loadMenuJSON(callback) {
|
||||
configCache.getModConfig('menu.hjson', function loaded(err, menuJson) {
|
||||
var menuFilePath = Config.general.menuFile;
|
||||
|
||||
// menuFile is assumed to be in 'mods' if a path is not supplied
|
||||
if('.' === paths.dirname(menuFilePath)) {
|
||||
menuFilePath = paths.join(__dirname, '../mods', menuFilePath);
|
||||
}
|
||||
|
||||
configCache.getConfig(menuFilePath, function loaded(err, menuJson) {
|
||||
callback(err, menuJson);
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue