CLI Task Run Utilities for NodeJs
npm i nodejs-cli-runner
Read and write common file types with cached storage
import { rootCommand } from "nodejs-cli-runner";
const program = rootCommand("cmd-name", [
// set of sub commands
]);
export default program;
import { taskRunner } from "nodejs-cli-runner";
await taskRunner(
taskName, // taskname
task, // function returning a Promise
options, // boolean or {verbose: boolean, progressIndicator: boolean} to print more verbose logs and enable progressIndicator
...taskArgs // arguments to task function
);
import { childProcess } from "nodejs-cli-runner";
await childProcess(
dir, // dir to run child process on
command, // command/ program to execute
args, // program arguments
stdout // stdout config,
stderr: // stderr config,
prefix?: // prefix string to prefix in all stdout and stderr lines
);
This project is a part of the Open Source Initiative from Sodaru Technologies
Write an email to [email protected] for queries on this project