@wooksjs/event-cli
v0.5.13
Published
@wooksjs/event-cli
Downloads
2,488
Maintainers
Readme
@wooksjs/event-cli
!!! This is work-in-progress library, breaking changes are expected !!!
As a part of wooks
event processing framework, @wooksjs/event-cli
implements CLI events and provides composables that let you:
- access flags (- or --)
Installation
npm install wooks @wooksjs/event-cli
Quick Start
import { useRouteParams } from 'wooks'
import { createCliApp, useCliOptions } from '@wooksjs/event-cli'
const app = createCliApp()
app.cli('test', () => {
console.log('options:')
return useCliOptions()
})
app.cli(':arg', () => {
console.log('run argument:', useRouteParams().params)
return 'done'
})
app.run()
// node ./index.js test
// node ./index.js random
Documentation
To check out docs, visit wooks.moost.org.