1.5.0 • Published 1 year ago

node-act v1.5.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
1 year ago

act build status npm version

Simple Task Management

Quickly write, organize, and run node.js build scripts/tasks with act.

Install

$ npm install -g node-act

Setup

  1. Add a directory named act-tasks to the root of your project.
  2. 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 --version

Tasks

All task scripts must export an object or function with the below properties.

Task with NO Methods

PropertyTypeAliasDetails
description (optional)stringdesc,descripThe description for the task.
value (optional)stringvalIf the task accepts a value this string should be a one-word description for it.
methodfunctionThe action for the task. If the task exports a function this property is not required.

Task with Methods

PropertyTypeAliasDetails
description (optional)stringdesc,descripThe description for the task.
value (optional)stringvalIf the task accepts a default value this string should be a one-word description for the value.
defaultstringThe methods executed if the task is called without any arguments (e.g. "-method= value -method").
methodsobject\<string, Method>The methods for the task.

Method

PropertyTypeAliasDetails
description (optional)stringdesc,descripThe description for the method.
value (optional)stringvalIf the method accepts a value this string should be a one-word description for it.
methodfunctionThe 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

1 year ago

1.5.0

1 year ago

1.4.1

7 years ago

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.1-beta.1

8 years ago

0.0.1-beta

8 years ago

0.0.1-alpha.3

8 years ago

0.0.1-alpha.2

8 years ago

0.0.1-alpha.1

8 years ago

0.0.1-alpha

8 years ago