"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const doc_1 = __importDefault(require("./doc"));
function build(type) {
    return __awaiter(this, void 0, void 0, function* () {
        const buildHandler = {
            doc: doc_1.default, // 处理文档生成
        };
        if (Object.prototype.hasOwnProperty.call(buildHandler, type)) {
            yield buildHandler[type]();
        }
    });
}
// 打包命令处理
function execBuild(options) {
    return __awaiter(this, void 0, void 0, function* () {
        Object.keys(options).forEach((type) => __awaiter(this, void 0, void 0, function* () {
            yield build(type);
        }));
    });
}
exports.default = execBuild;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb21tYW5kcy9idWlsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLGdEQUE0QjtBQU01QixTQUFlLEtBQUssQ0FBQyxJQUFZOztRQUMvQixNQUFNLFlBQVksR0FBaUI7WUFDakMsR0FBRyxFQUFFLGFBQVEsRUFBRSxTQUFTO1NBQ3pCLENBQUE7UUFDRCxJQUFJLE1BQU0sQ0FBQyxTQUFTLENBQUMsY0FBYyxDQUFDLElBQUksQ0FBQyxZQUFZLEVBQUUsSUFBSSxDQUFDLEVBQUU7WUFDNUQsTUFBTSxZQUFZLENBQUMsSUFBYSxDQUFDLEVBQUUsQ0FBQTtTQUNwQztJQUNILENBQUM7Q0FBQTtBQUVELFNBQVM7QUFDVCxTQUFlLFNBQVMsQ0FBQyxPQUFlOztRQUN0QyxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxDQUFDLE9BQU8sQ0FBQyxDQUFPLElBQUksRUFBRSxFQUFFO1lBQzFDLE1BQU0sS0FBSyxDQUFDLElBQUksQ0FBQyxDQUFBO1FBQ25CLENBQUMsQ0FBQSxDQUFDLENBQUE7SUFDSixDQUFDO0NBQUE7QUFFRCxrQkFBZSxTQUFTLENBQUEifQ==