first part is working

This commit is contained in:
Wolfgang Hottgenroth
2018-05-16 10:24:31 +02:00
parent 93658dcc30
commit 74584cdbbe
38 changed files with 574 additions and 251 deletions

15
dist/config.js vendored Normal file
View File

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