# @runner/core

> Simple task runner core.

Latest version **1.1.0** (published 2018-06-19) · GPL-3.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @runner/core
pnpm add @runner/core
yarn add @runner/core
bun add @runner/core
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-06-19 |
| First published | 2018-06-05 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Stanislav Kalashnik |
| Maintainers | runner |
| Keywords | task, runner, core |

## Links

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

## Dependencies (4)

- [chokidar](https://npm.io/package/chokidar.md) ^2.0.4
- [@runner/tools](https://npm.io/package/@runner/tools.md) ^1.1.0
- [@cjssdk/runner](https://npm.io/package/@cjssdk/runner.md) ^1.5.0
- [@runner/logger](https://npm.io/package/@runner/logger.md) ^1.0.0

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2018-06-19
- 1.0.1 — 2018-06-12
- 1.0.0 — 2018-06-05

## README

Task runner core
================

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


## Installation ##

```bash
npm install @runner/core
```


## Usage ##

Add to the scope:

```js
var runner = require('@runner/core');
```

Create a simple task:

```js
runner.task('make', function () {
    // some actions
});
```

More examples of tasks creation and execution are available
in the [@cjssdk/runner](https://www.npmjs.com/package/@cjssdk/runner) package.

Add an alias to an existing task:

```js
runner.alias('build', 'make');
```

Run task on a key or keys combination press:

```js
runner.keystroke('build', 'ctrl+b');
```

### Files watching

To execute a specific task on some file changes:

```js
runner.watch('src/script/**/*.js', 'webpack:build');
```

To execute a named or anonymous function:

```js
runner.watch('src/script/**/*.js', function rebuild ( done ) {
    // function name "rebuild" is used as task name
    // otherwise <noname> is printed
    done();
});
```

To execute task series:

```js
runner.watch('src/script/**/*.js', runner.serial('lint', 'build'));
```

Before calling `runner.watch` it's possible to configure the watch:

```js
runner.watch.config = {
    // some configuration 
};
```

All available configurations you can see in the underlying [chokidar](https://www.npmjs.com/package/chokidar) package.


## Contribution ##

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


## License ##

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

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