npm.io
0.1.6 • Published 1 year ago

@mytikas/tool-kit

Licence
ISC
Version
0.1.6
Deps
4
Size
18 kB
Vulns
0
Weekly
0

tool-kit

description

tool-kit is a collection of tools for nodejs.

install

pnpm add @mytikas/tool-kit

usage

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