0.1.6 • Published 7 months ago
@mytikas/tool-kit v0.1.6
tool-kit
description
tool-kit is a collection of tools for nodejs.
install
pnpm add @mytikas/tool-kitusage
import { initContext } from '@mytikas/tool-kit'
const ctx = initContext('namespace', options)FlowCommand
封装了 inquirer 的一些常用方法
import { FlowCommand } from '@mytikas/tool-kit'
await FlowCommand.select('请选择一个选项', ['a', 'b', 'c'])
await FlowCommand.password('请输入密码')
await FlowCommand.input('请输入一些内容')
await FlowCommand.confirm('是否继续')
await FlowCommand.autocomplete('请选择一个选项', ['a', 'b', 'c'])
await FlowCommand.checkbox('请选择一些选项', ['a', 'b', 'c'])
await FlowCommand.prompt() // 自定义 inquirer.prompt