![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
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.
The npm package ink-task receives a total of 1 weekly downloads. As such, ink-task popularity was classified as not popular.
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.