pon
Super simple task runner to call named functions from CLI
Table of Contents
Installation
$ npm install pon --save
Usage
Create runner with tasks and pass task names to run
'use strict' const pon = const css = const browser = { const run = // Execute task by names await }
Advanced Usage
Defining task in various ways
- Task is just an async function
- Task can be a string which is the name of another task
- Tasks can be nested
- Task can be array of function (or string)
'use strict' const pon = { const run = await // Runs tasks sequentially await // By pattern await // Same as call `await run('fitness.default') await // Call another tasks}
CLI Usage
Install pon-cli as global module.
$ npm install pon-cli -g
Create Ponfile.js at your project root and define tasks there.
'use strict' const pon = moduleexports =
Then, call task from command line
pon "myapp:*"
Develop Own Plugin
Use pon-scaffold to generate your own plugin.
Install scaffold CLI
npm i pon-scaffold -g
Task Plugin
Pass the task name to generate
pon-scaffold task "pon-task-my-own"
Then, edit lib/define.js under the generated project.
License
This software is released under the Apache-2.0 License.