From ea820dbbbbc6adb975d388cd9b112c0ecdb32114 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Thu, 14 Jan 2016 22:56:21 -0700 Subject: [PATCH] Missing config_util.js --- core/config_util.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 core/config_util.js diff --git a/core/config_util.js b/core/config_util.js new file mode 100644 index 00000000..f078f758 --- /dev/null +++ b/core/config_util.js @@ -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); + }); +} \ No newline at end of file