"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const events_1 = require("events");
const FS = tslib_1.__importStar(require("fs"));
const Path = tslib_1.__importStar(require("path"));
const strip_json_comments_1 = tslib_1.__importDefault(require("strip-json-comments"));
class Config extends events_1.EventEmitter {
    constructor(path) {
        super();
        path = Path.resolve(path);
        this.path = path;
        this.dir = Path.dirname(path);
        this.load();
    }
    load() {
        let jsonc = FS.readFileSync(this.path, 'utf8');
        let json = strip_json_comments_1.default(jsonc);
        this.raw = JSON.parse(json);
    }
}
exports.AbstractConfig = Config;
//# sourceMappingURL=config.js.map