Package Exports
- cli-chain
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cli-chain) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
🖥⛓ cli-chain
easy, powerful, interactive, fluent cli.
📖 documentation
📘 examples
extending vorpal it comes with all the goodies, nestable interactive command action stories with ~10x less lines of code than any other lib.
const {CLI, log} = require('cli-chain')
CLI.program()
.command('release')
.actionPrompt('confirm')
.type('confirm')
.message('Are you sure you want to release?')
.step('env')
.checkbox('production', true)
.checkbox('development', false)
.then((args) => {
if (args.continue) log.yellow('Good move.').echo()
else log.bold('Off we go!.').data(args).echo()
})
.command('skeleton')
.alias('seed')
.alias('scaffold')
.actionPrompt('is this cool or what?', 'confirm')
.parse()
.show()
storytelling
const CLI = require('cli-chain')
const easyButton = CLI
.step('presets', 'checkbox', '[presets message]')
.checkbox('production', true)
.checkbox('development', false)
.step('approved')
.checkbox('magical', true)
.checkbox('unicorns', false)
.child('unicorn babies', 'input')
.input('so cute!')
.toSteps()
.step('confirm or deny?', 'confirm')
.child('fosho fosho?', 'confirm')
.toSteps()
.step('view', 'list')
.choice('React')
.choice('Inferno')
.choice('Vue')
.choice('Angular')
.choice('other')
.step('other', 'input').when(answers => answers.view == 'view.other')
easyButton.run()
👽 exports
const {
vorpal,
inquirer,
log,
Program,
Stepper,
Steps,
Question,
Choice,
Core,
} = require('cli-chain')