@yonle/multitask

1.0.0-r7 • Public • Published

multitask

A simple multitask script that used for development like compile/building.

Note: This is NOT Terminal Multiplexer

Installing

npm install @yonle/multitask

Or install as global

npm install @yonle/multitask -g
multitask

CLI Usage

multitask [File(optional)]

By default, Multitask cli will reads a file in Tasks.json or Tasks.js for Tasks list.

Each task is written in Array format. Tasks.json sometime can looks like this:

[
	["echo", ["Hello World"]],
	["pwd", [], {
		"cwd": "/home/username",
		"shell": true
	}]
]

This will result:

Hello World
___________________________________
/home/username

Limiting Process

By default, multitask only runs 4 tasks in same time. This can be changed by changing the environment variable MULTITASK_LIMIT

API

createProcess(command, args, options)

Returns Promise. Promise will Resolve exit code of process.

[Promise <pending>] {
	spawn: // ....
}

bar(length, bar)

  • length : Length of bar that should be generated
  • bar : Bar symbols (Default: "_")

Returns String.

Package Sidebar

Install

npm i @yonle/multitask

Weekly Downloads

0

Version

1.0.0-r7

License

MIT

Unpacked Size

5.73 kB

Total Files

5

Last publish

Collaborators

  • yonle