1.0.14 • Published 3 years ago

@speedflow/plugin-confirm-to-checkbox v1.0.14

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

@speedflow/plugin-confirm-to-checkbox

一个将confirm类型的prompt转换成checkbox选项的speedflow插件。

安装

$ npm i @speedflow/plugin-confirm-to-checkbox --registry=https://nexus.huya.com/repository/npm-public

使用

Constructor(props: object)

  • props.skipKeys?: string[] - 当问题是confirm类型时,可通过该选项逃过被插件收集为checkbox选项。
  • props.heightPriorityPromptKeys?: string[] - 高权重的key队列,重组之后的prompts会优先把heightPriorityPromptKeys的成员对应的问题排到前面, 默认'name','author','description','category'
  • props.message?: string - 提问的信息,默认是‘请选择如下选项’。

Demo

new ConfirmToCheckBoxPlugin({
  message: 'mock message',
  skipKeys: ['createGit', 'useCI'],
  heightPriorityPromptKeys: ['some', 'thing']
})