0.2.4 • Published 4 years ago
captain v0.2.4
Features
Coming soon
Usage
Installation
Guided tutorial on path.cafe (coming soon)
npm install captain
API
Example
- Write workflow
rate.js
:
export default function* rate(){
let rating = yield ["collect/number", {
message: "How would you rate this, from 1 to 10?",
min: 1,
max: 10,
initial: 5
}]
let reason = yield ["collect/text", {
message: `Why did you rate this a ${rating}?`
}]
return { rating, reason };
}
- Call workflow using
captain
captain ./rate.js
Possible Prompts: yield [type, props]
Type | Props |
---|---|
collect/text | { message, initial, validate } |
collect/secret | { message, validate } |
collect/number | { message, initial, min, max, float, validate } |
collect/date | { message, initial, locales, mask } |
collect/confirm | { message, initial } |
collect/toggle | { message, initial, active, inactive } |
collect/select | { message, initial, multi, hint, choices ({ title, description, value, disabled }) } |
font/[font_name] | { message, colors } |
md | markdown |
progress | { message, promise } |
Examples
Coming soon
Details
Development
Contributing Guidelines
Commands
Guided process to commit changes and/or submit a pull request
npm run save
Roadmap
Coming soon
Acknowledgements
- Thanks to @shinuza for the package name
- Generator section in JavaScript Glossary on Demand
License
MIT © Marshall Brandt