typescriptifying

This commit is contained in:
Wolfgang Hottgenroth
2018-01-08 21:54:59 +01:00
parent c1fa639ae4
commit 9e39d74084
12 changed files with 607 additions and 105 deletions

16
dist/config.js vendored Normal file
View File

@ -0,0 +1,16 @@
"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