Files
dispatcher_ng/dist/config.js
Wolfgang Hottgenroth 9e39d74084 typescriptifying
2018-01-08 21:54:59 +01:00

16 lines
612 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const cmdargs = require("command-line-args");
const logger = require("./log");
const OPTION_DEFINITIONS = [
{ name: 'verbose', alias: 'v', type: Boolean },
{ name: 'config', alias: 'c', type: String, defaultValue: '~/dispatcher_ng.conf' }
];
function readConfig() {
let options = cmdargs(OPTION_DEFINITIONS);
exports.dict = JSON.parse(fs.readFileSync(options.config, "utf8"));
logger.info(JSON.stringify(exports.dict));
}
exports.readConfig = readConfig;
//# sourceMappingURL=config.js.map