# grunt-concurrent

> Run grunt tasks concurrently

Latest version **3.0.0** (published 2019-06-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install grunt-concurrent
pnpm add grunt-concurrent
yarn add grunt-concurrent
bun add grunt-concurrent
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2019-06-23 |
| First published | 2013-04-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 4 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 791 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | gruntplugin, concurrent, parallel, simultaneous, optimize, speed, perf, performance, fast, faster |

## Links

- npm: https://www.npmjs.com/package/grunt-concurrent
- Repository: https://github.com/sindresorhus/grunt-concurrent
- Homepage: https://github.com/sindresorhus/grunt-concurrent#readme
- Issues: https://github.com/sindresorhus/grunt-concurrent/issues
- npm.io page: https://npm.io/package/grunt-concurrent

## Dependencies (4)

- [async](https://npm.io/package/async.md) ^3.1.0
- [arrify](https://npm.io/package/arrify.md) ^2.0.1
- [pad-stream](https://npm.io/package/pad-stream.md) ^2.0.0
- [indent-string](https://npm.io/package/indent-string.md) ^4.0.0

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2019-06-23
- 2.3.1 — 2016-08-13
- 2.3.0 — 2016-04-08
- 2.2.1 — 2016-02-19
- 2.2.0 — 2016-02-19
- 2.1.0 — 2015-11-14
- 2.0.4 — 2015-10-27
- 2.0.3 — 2015-08-23
- 2.0.2 — 2015-08-19
- 2.0.1 — 2015-07-29
- 2.0.0 — 2015-06-18
- 1.0.1 — 2015-06-13
- 1.0.0 — 2014-09-01
- 0.5.0 — 2014-03-07
- 0.4.3 — 2014-01-16
- … 8 more at https://npm.io/package/grunt-concurrent/versions

## README

# grunt-concurrent [![Build Status](https://travis-ci.org/sindresorhus/grunt-concurrent.svg?branch=master)](https://travis-ci.org/sindresorhus/grunt-concurrent)

> Run grunt tasks concurrently

<img src="screenshot.png" width="439">

Running slow tasks like Coffee and Sass concurrently can potentially improve your build time significantly. This task is also useful if you need to run [multiple blocking tasks](#logconcurrentoutput) like `nodemon` and `watch` at once.


## Install

```
$ npm install --save-dev grunt-concurrent
```


## Usage

```js
require('load-grunt-tasks')(grunt);

grunt.initConfig({
	concurrent: {
		target1: ['coffee', 'sass'],
		target2: ['jshint', 'mocha']
	}
});

// Tasks of target1 run concurrently, after they all finished, tasks of target2 run concurrently, instead of target1 and target2 running concurrently.
grunt.registerTask('default', ['concurrent:target1', 'concurrent:target2']);
```

## Sequential tasks in concurrent target

```js
grunt.initConfig({
	concurrent: {
		target: [['jshint', 'coffee'], 'sass']
	}
});
```

Now `jshint` will always be done before `coffee` and `sass` runs independent of both of them.


## Options

### limit

Type: `number`<br>
Default: Twice the number of CPU cores with a minimum of 2

Limit how many tasks that are run concurrently.

### logConcurrentOutput

Type: `boolean`<br>
Default: `false`

You can optionally log the output of your concurrent tasks by specifying the `logConcurrentOutput` option. Here is an example config which runs [grunt-nodemon](https://github.com/ChrisWren/grunt-nodemon) to launch and monitor a node server and [grunt-contrib-watch](https://github.com/gruntjs/grunt-contrib-watch) to watch for asset changes all in one terminal tab:

```js
grunt.initConfig({
	concurrent: {
		target: {
			tasks: ['nodemon', 'watch'],
			options: {
				logConcurrentOutput: true
			}
		}
	}
});

grunt.loadNpmTasks('grunt-concurrent');
grunt.registerTask('default', ['concurrent:target']);
```

*The output will be messy when combining certain tasks. This option is best used with tasks that don't exit like `watch` and `nodemon` to monitor the output of long-running concurrent tasks.*

### indent

Type: `boolean`<br>
Default: `true`

You can optionally skip indenting the log output of your concurrent tasks by specifying `false`. This can be useful for running tasks in parallel for a stdout parser which expects no indentation, for example, TeamCity tests.

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