1.5.0 • Published 3 years ago
node-act v1.5.0
act

Simple Task Management
Quickly write, organize, and run node.js build scripts/tasks with act.
Install
$ npm install -g node-actSetup
- Add a directory named act-tasks to the root of your project.
- For each task add a new script,
task-name.js, to the act-tasks directory. The name of the file is the name of the task. The name must start with a lower-case letter, and the file should export a Task.
Use
$ cd <your-project-root>
# BASIC USE
$ act <task> [...-method]
# PASS VALUES
$ act <task=> <value>
$ act <task> <-method=> <value>
$ act <task=> <defaultMethodsValue> <-method=> <methodValue> <-method>
# RUN MULTIPLE TASKS
$ act <task> <task> <task>
$ act <task> <-method> <task> <task=> <value>
# SHOW HELP INFO
$ act
$ act ?
$ act -h
$ act --help
# SHOW VERSION
$ act -v
$ act --versionTasks
All task scripts must export an object or function with the below properties.
Task with NO Methods
| Property | Type | Alias | Details |
|---|---|---|---|
| description (optional) | string | desc,descrip | The description for the task. |
| value (optional) | string | val | If the task accepts a value this string should be a one-word description for it. |
| method | function | The action for the task. If the task exports a function this property is not required. |
Task with Methods
| Property | Type | Alias | Details |
|---|---|---|---|
| description (optional) | string | desc,descrip | The description for the task. |
| value (optional) | string | val | If the task accepts a default value this string should be a one-word description for the value. |
| default | string | The methods executed if the task is called without any arguments (e.g. "-method= value -method"). | |
| methods | object\<string, Method> | The methods for the task. |
Method
| Property | Type | Alias | Details |
|---|---|---|---|
| description (optional) | string | desc,descrip | The description for the method. |
| value (optional) | string | val | If the method accepts a value this string should be a one-word description for it. |
| method | function | The action for the method. If the Method is a function (instead of an object) this property is not required. |
Config
To change the act config just add config.json to your act-tasks directory with your desired settings.
Shortcuts
You may create task aliases by adding an alias property to your config.json. The alias property's value should be an object with name => command pairs.
Example
{
"alias": {
"name": "task -method task= value -method"
},
"throw": false,
"exit": true,
"done": true
}Other Details
contributing: see contributing guideline bugs/improvements: open an issue questions: imagineadamsmith@gmail.com
Happy Developing
1.4.2
3 years ago
1.5.0
3 years ago
1.4.1
9 years ago
1.4.0
10 years ago
1.3.0
10 years ago
1.2.0
10 years ago
1.1.2
10 years ago
1.1.1
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.0.1-beta.1
10 years ago
0.0.1-beta
10 years ago
0.0.1-alpha.3
10 years ago
0.0.1-alpha.2
10 years ago
0.0.1-alpha.1
10 years ago
0.0.1-alpha
10 years ago