import { PromptModuleAPI } from "../promptModuleAPI"; /** * @unsupported */ export default function(cli: PromptModuleAPI): void { cli.injectFeature({ name: "Ant", value: "ant", description: "Add ant-design or ant-mobile to your project", plugins: ["ant"], link: "https://ant.design/index-cn", }); cli.injectPrompt({ name: "Ant", when: (answers) => answers.features.includes("css-preprocessor"), type: "list", message: `Pick ant-design or ant-mobile to add your project`, choices: [ { name: "Ant-design", value: "design", }, { name: "Ant-mobile", value: "mobile", }, ], }); cli.onPromptComplete((answers, options) => { if (!options.plugins) { return; } options.plugins["cli-plugin-ant"] = options; }); };