# node-runner

> Task runner.

Latest version **1.0.2** (published 2018-01-25) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install node-runner
pnpm add node-runner
yarn add node-runner
bun add node-runner
```

Provides the command `runner`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-01-25 |
| First published | 2011-06-13 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Stanislav Kalashnik |
| Maintainers | darkpark |
| Keywords | cli, task, runner |

## Links

- npm: https://www.npmjs.com/package/node-runner
- Repository: https://github.com/DarkPark/node-runner
- Homepage: https://github.com/DarkPark/node-runner#readme
- Issues: https://github.com/DarkPark/node-runner/issues
- npm.io page: https://npm.io/package/node-runner

## Dependencies (6)

- [colors](https://npm.io/package/colors.md) 1.*.*
- [chokidar](https://npm.io/package/chokidar.md) 1.*.*
- [commander](https://npm.io/package/commander.md) 2.*.*
- [cjs-runner](https://npm.io/package/cjs-runner.md) 1.*.*
- [strip-ansi](https://npm.io/package/strip-ansi.md) 4.*.*
- [node-notifier](https://npm.io/package/node-notifier.md) 5.*.*

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2018-01-25
- 1.0.1 — 2018-01-18
- 1.0.0 — 2018-01-17
- 0.1.0 — 2011-06-13

## README

Task runner
===========

[![build status](https://img.shields.io/travis/DarkPark/node-runner.svg?style=flat-square)](https://travis-ci.org/DarkPark/node-runner)
[![npm version](https://img.shields.io/npm/v/node-runner.svg?style=flat-square)](https://www.npmjs.com/package/node-runner)
[![dependencies status](https://img.shields.io/david/DarkPark/node-runner.svg?style=flat-square)](https://david-dm.org/DarkPark/node-runner)
[![devDependencies status](https://img.shields.io/david/dev/DarkPark/node-runner.svg?style=flat-square)](https://david-dm.org/DarkPark/node-runner?type=dev)
[![Gitter](https://img.shields.io/badge/gitter-join%20chat-blue.svg?style=flat-square)](https://gitter.im/DarkPark/spasdk)


## Installation ##

Can be local or global.

```bash
npm install node-runner --global
```


## Usage ##

Add to the scope:

```js
var runner = require('node-runner');
```


### Tasks configuration ###

@todo


### Logging ###

General output in different colors:

```js
// 16:25:30.811 simple line
runner.log.info('simple line');

// 16:25:30.811 warning message
runner.log.warn('warning message');

// 16:25:30.811 error
runner.log.fail('error');

// print some complex data
runner.log.inspect(someObject);
```

Access [colors](https://www.npmjs.com/package/colors) instance:

```js
var colors = runner.log.colors;

runner.log.info(
    colors.black.bgYellow('black text on yellow background')
);
```

Some task specific output:

```js
var log = runner.log.wrap('webpack');

// 16:25:30.811 [webpack] build is ok
log.info('build is ok');
```


### Helpers ###

```js
var tools = require('node-runner/lib/tools');
```

Remove some generated files:

```js
tools.unlink(
    ['build/develop/main.css', 'build/develop/main.js'],
    log,
    function ( error ) {
        console.log(error);    
    }
);
```

Write generated files content:

```js
tools.write(
    [{name: 'build/develop/main.js', data: someContent}],
    log,
    function ( error ) {
        console.log(error);    
    }
);
```

Create new directories and any necessary subdirectories:

```js
tools.mkdir(
    ['build/develop', 'build/release'],
    log,
    function ( error ) {
        console.log(error);    
    }
);
```

### Modules ###

Activate system popup notifications on errors:

```js
require('node-runner/lib/notify');
```

Add system task `status` to get all tasks running state:
```js
require('node-runner/lib/status');
```


## Contribution ##

If you have any problems or suggestions please open an [issue](https://github.com/DarkPark/node-runner/issues)
according to the contribution [rules](.github/contributing.md).


## License ##

`node-runner` is released under the [GPL-3.0 License](http://opensource.org/licenses/GPL-3.0).

---
_Source: https://npm.io/package/node-runner · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
