UNPKG

@micro-cli/create

Version:

A Cli to quickly create modern Vite-based web app.

17 lines (15 loc) 534 B
import type { answersTypes } from '../../types'; import type PromptModuleAPI from '../promptModuleAPI'; export default (cli: PromptModuleAPI) => { cli.injectFeature({ name: 'TypeScript', value: 'TypeScript', description: 'Add support for the TypeScript language', }); cli.onPromptComplete((answers: answersTypes, options: any) => { if (answers.features?.includes('TypeScript')) { // eslint-disable-next-line no-param-reassign options.plugins['@micro-cli/cli-plugin-typescript'] = {}; } }); };