datapack-manager
Version:
Manage your Minecraft datapacks
29 lines (24 loc) • 767 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var _tslib = require('../_virtual/_tslib.js');
var config = require('../config.js');
const command = "config <key> [<value>]";
const desc = "Configure datapack-manager";
function builder(yargs) {
return yargs;
}
function handler({ key, value }) {
return _tslib.__awaiter(this, void 0, void 0, function* () {
if (typeof value === "undefined") {
console.log(`${key} = ${JSON.stringify(config.default[key])}`);
return;
}
config.default[key] = value;
yield config.default.save();
});
}
exports.builder = builder;
exports.command = command;
exports.desc = desc;
exports.handler = handler;