New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-act

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-act

a simple task runner

latest
Source
npmnpm
Version
1.5.0
Version published
Weekly downloads
11
1000%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • 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 --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

Keywords

imaginate

FAQs

Package last updated on 16 Dec 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts