Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Bringing task handling on Ink.
Ink is awesome. But making complete CLI apps with a lot of tasks and flags could get messy.
ink-task
is a Ink plugin that let you handle tasks, react-router
style.
$ npm install ink-task
Basically,
import { Switch, Task, Help } from 'ink-task'
...
<Switch>
<Task match="hello" defaultFlags={{ name: 'world' }} component={Greeting} />
<Task match={[ "login", "l" ]} component={Login} />
<Task match="*" component={Help} isHelp />
</Switch>
PROPS
match
: a string / array of matching keywords. *
will always match.defaultFlags
: default flags passed through the component's props if user don't fill them.component
: the component to render if a task matches.isHelp
: pass through helpData
to your component, an extra prop with your defaultFlags
and match
keys.Note : Every flags user type would get to the reached component in a prop called flags
.
HELP COMPONENT
This handy component use helpData
to render a basic help message.
This package is in active development. I still have a lot of features to integrate and edges to smooth. However, I'll try not break things and release bugged stuff.
If you've spotted any problems, please fill an issue. Thanks!
Licence : MIT
FAQs
Bringing task handling on Ink.
We found that ink-task demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.