New Config class working quite well for system config. Menu.hjson/etc. to come

This commit is contained in:
Bryan Ashby 2020-06-11 21:16:15 -06:00
parent 37bc2fc3aa
commit 9394730011
No known key found for this signature in database
GPG key ID: B49EB437951D2542
4 changed files with 128 additions and 266 deletions

View file

@ -69,15 +69,12 @@ function main() {
const configOverridePath = argv.config;
return callback(null, configOverridePath || conf.getDefaultPath(), _.isString(configOverridePath));
return callback(null, configOverridePath || conf.Config.getDefaultPath(), _.isString(configOverridePath));
},
function initConfig(configPath, configPathSupplied, callback) {
const configFile = configPath + 'config.hjson';
conf.Config.create(configFile, {}, err => {
console.log(err);
});
conf.init(resolvePath(configFile), function configInit(err) {
conf.Config.create(resolvePath(configFile), err => {
//
// If the user supplied a path and we can't read/parse it
// then it's a fatal error