homepage/dist/config.js

15 lines
541 B
JavaScript
Raw Normal View History

2018-05-09 14:31:22 +02:00
"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: '~/homepage.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