"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 command_1 = __importDefault(require("./command"));
const chalk_1 = __importDefault(require("chalk"));
function init() {
    return __awaiter(this, void 0, void 0, function* () {
        try {
            // 注册脚手架所有使用的命令
            (0, command_1.default)();
        }
        catch (e) {
            console.log('错误:', chalk_1.default.red(e.message));
            // 开启调试的话就出现完整的报错
            if (process.env.debug) {
                console.log(chalk_1.default.red(e));
            }
        }
    });
}
exports.default = init;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2NvcmUvaW5pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLHdEQUF1QztBQUN2QyxrREFBeUI7QUFFekIsU0FBZSxJQUFJOztRQUNqQixJQUFJO1lBQ0YsZUFBZTtZQUNmLElBQUEsaUJBQWUsR0FBRSxDQUFBO1NBQ2xCO1FBQUMsT0FBTyxDQUFNLEVBQUU7WUFDZixPQUFPLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxlQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFBO1lBQ3hDLGlCQUFpQjtZQUNqQixJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFO2dCQUNyQixPQUFPLENBQUMsR0FBRyxDQUFDLGVBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTthQUMxQjtTQUNGO0lBQ0gsQ0FBQztDQUFBO0FBRUQsa0JBQWUsSUFBSSxDQUFBIn0=