Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

npm-run-all2

bcomnes3.7mMIT7.0.1

A CLI tool to run multiple npm-scripts in parallel or sequential. (Maintainence fork)

cli, command, commandline, tool, npm, npm-scripts, run, sequential, serial, parallel, task

readme

index npm-run-all run-s run-p Node API

npm-run-all2

npm version Downloads/month tests Coverage Status neostandard javascript style

A CLI tool to run multiple npm-scripts in parallel or sequential.

npm-run-all2 why?

A maintenance fork of npm-run-all. npm-run-all2 is a fork of npm-run-all with dependabot updates, release automation enabled and some troublesome babel stuff removed to further reduce maintenance burden. Hopefully this labor can upstream some day when mysticatea returns, but until then, welcome aboard!

⤴️ Motivation

  • Simplify. The official npm run-script command cannot run multiple scripts, so if we want to run multiple scripts, it's redundant a bit. Let's shorten it by glob-like patterns.
    Before: npm run clean && npm run build:css && npm run build:js && npm run build:html
    After: npm-run-all clean build:*
  • Cross platform. We sometimes use & to run multiple command in parallel, but cmd.exe (npm run-script uses it by default) does not support the &. Half of Node.js users are using it on Windows, so the use of & might block contributions. npm-run-all --parallel works well on Windows as well.

💿 Installation

$ npm install npm-run-all2 --save-dev
# or
$ yarn add npm-run-all2 --dev
  • It requires Node@>=14. It may work on older versions of Node, but no guarantees are given.

📖 Usage

CLI Commands

This npm-run-all package provides 3 CLI commands.

The main command is npm-run-all. We can make complex plans with npm-run-all command.

Both run-s and run-p are shorthand commands. run-s is for sequential, run-p is for parallel. We can make simple plans with those commands.

Yarn / pnpm Compatibility

npm-run-all is compatible with both Yarn and pnpm. If a script is invoked using either package manager, npm-run-all will correctly utilize it to execute the plan's child scripts.

Node API

This npm-run-all package provides Node API.

📰 Changelog

🍻 Contributing

Welcome♡

Bug Reports or Feature Requests

Please use GitHub Issues.

Correct Documents

Please use GitHub Pull Requests.

I'm not familiar with English, so I especially thank you for documents' corrections.

Implementing

Please use GitHub Pull Requests.

There are some npm-scripts to help developments.

  • npm test - Run tests and collect coverage.
  • npm run clean - Delete temporary files.
  • npm run lint - Run ESLint.
  • npm run watch - Run tests (not collect coverage) on every file change.

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Generated by auto-changelog.

v7.0.1

Commits

  • Revert engine range bump back to Node 18 b2e849b

v7.0.0 - 2024-10-21

Merged

  • Prevent a throw when looking up undefined results #158

Commits

  • Breaking change: Bump node engines ^18.17.0 || >=20.5.0 49b95f0
  • Merge pull request #156 from bcomnes/rm-rf-rimraf c661ffc
  • Remove rimraf c77e085

v6.2.6 - 2024-10-21

Commits

  • Prevent a throw when looking up undefined results d928f9a

v6.2.4 - 2024-10-18

Merged

  • Switch to JS-based which command #154

Fixed

  • Switch to JS-based which command #153

v6.2.3 - 2024-09-13

Commits

  • Merge pull request #151 from bcomnes/fix-pnpm-agian c43fa2b
  • Avoid passing config fields as flags for pnpm dc2d7da

v6.2.2 - 2024-07-04

Commits

  • Revert "Compatibility: npm, yarn and pnpm run scripts" fc35f0d

v6.2.1 - 2024-07-03

Merged

  • Compatibility: npm, yarn and pnpm run scripts #143
  • Use neostandard + add more static code analysis #142
  • Upgrade: Bump c8 from 9.1.0 to 10.0.0 #141
  • Upgrade: Bump p-queue from 7.4.1 to 8.0.1 #138

v6.2.0 - 2024-05-17

Merged

  • Placeholder that unfolds into multiple tasks #134
  • 📝 add compatibility note for pnpm. #136
  • Upgrade: Bump codecov/codecov-action from 3 to 4 #131

v6.1.2 - 2024-01-31

Merged

  • feat: move to read-package-json-fast #130
  • Upgrade: Bump c8 from 8.0.1 to 9.0.0 #127
  • Upgrade: Bump github/codeql-action from 2 to 3 #126
  • Upgrade: Bump actions/setup-node from 3 to 4 #123

Commits

  • Publish the whole project 3dde20c
  • Utilize CJS require for 'read-package-json-fast' 605ca15
  • Update FUNDING.yml c838ee9

v6.1.1 - 2023-10-04

Commits

v6.1.0 - 2023-10-04

Merged

  • Upgrade: Bump actions/checkout from 3 to 4 #119

Commits

v6.0.6 - 2023-07-04

Merged

  • Update all esm only packages #114
  • Upgrade: Bump c8 from 7.14.0 to 8.0.0 #111
  • Delete .nycrc #109
  • Update CodeQL workflow #110

Commits

v6.0.5 - 2023-04-03

Merged

  • Upgrade: Bump bcomnes/npm-bump from 2.1.0 to 2.2.1 #104
  • Upgrade: Bump minimatch from 6.2.0 to 7.0.0 #103
  • Upgrade: Bump minimatch from 5.1.4 to 6.0.4 #102
  • Upgrade: Bump fs-extra from 10.1.0 to 11.1.0 #98

Commits

  • Merge pull request #105 from bcomnes/dependabot/npm_and_yarn/minimatch-8.0.2 cbf78c8
  • Upgrade: Bump minimatch from 7.4.4 to 8.0.2 c90d02b
  • Merge pull request #101 from bcomnes/dependabot/npm_and_yarn/rimraf-4.0.4 d0d46a2

v6.0.4 - 2022-11-09

Merged

  • When running through npx, use the npm that should be next to it. #96

v6.0.3 - 2022-11-09

Merged

  • Upgrade: Bump jsdoc from 3.6.11 to 4.0.0 #95
  • Upgrade: Bump bcomnes/npm-bump from 2.0.2 to 2.1.0 #92
  • docs: update minimum supported Node version #90

Commits

  • Merge pull request #94 from MarmadileManteater/runjs-being-called-instead-of-npm-run da913f9
  • Use NPM_CLI_JS over npm_execpath 0224167
  • Add a proper check for yarn bb41ef6

v6.0.2 - 2022-08-16

Merged

  • Update package shell quote #89

v6.0.1 - 2022-06-14

Commits

  • Lower bound node engine to ^14.18.0 || >=16.0.0 fc2957f

v6.0.0 - 2022-06-11

Merged

  • Move support to node 16 and npm 8 #85
  • Upgrade: Bump pidtree from 0.5.0 to 0.6.0 #84
  • Upgrade: Bump mocha from 9.2.2 to 10.0.0 #83
  • Upgrade: Bump github/codeql-action from 1 to 2 #82
  • Upgrade: Bump fastify/github-action-merge-dependabot from 3.0.2 to 3.1 #78
  • Upgrade: Bump codecov/codecov-action from 2 to 3 #77
  • Upgrade: Bump actions/setup-node from 2 to 3 #75
  • Upgrade: Bump actions/checkout from 2 to 3 #76
  • Upgrade: Bump minimatch from 4.2.1 to 5.0.0 #74
  • Upgrade: Bump minimatch from 3.1.1 to 4.1.1 #73
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.7.1 to 3.0.2 #72
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.7.0 to 2.7.1 #71
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.6.0 to 2.7.0 #70
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.5.0 to 2.6.0 #69
  • Simplify npm scripts #64
  • Update CI config #62
  • Add CodeQL workflow #65
  • Switch to c8 for coverage #66
  • tests: switch to assert's strict mode #67
  • Enforce LF in the repo. #61
  • Upgrade: Bump actions/setup-node from 2.4.0 to 2.4.1 #59
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.4.0 to 2.5.0 #58
  • Upgrade: Bump codecov/codecov-action from 2.0.2 to 2.1.0 #57
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.2.0 to 2.4.0 #54
  • Upgrade: Bump actions/setup-node from 2.3.2 to 2.4.0 #53
  • Upgrade: Bump actions/setup-node from 2.3.1 to 2.3.2 #52
  • Upgrade: Bump actions/setup-node from 2.3.0 to 2.3.1 #51
  • Upgrade: Bump codecov/codecov-action from 2.0.1 to 2.0.2 #50
  • Upgrade: Bump actions/setup-node from 2.2.0 to 2.3.0 #49
  • Upgrade: Bump codecov/codecov-action from 1.5.2 to 2.0.1 #48
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.1.1 to 2.2.0 #47
  • Upgrade: Bump actions/setup-node from 2.1.5 to 2.2.0 #46
  • Upgrade: Bump codecov/codecov-action from 1.5.0 to 1.5.2 #44
  • Upgrade: Bump mocha from 8.4.0 to 9.0.0 #43
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.1.0 to 2.1.1 #42
  • Upgrade: Bump fastify/github-action-merge-dependabot from 2.0.0 to 2.1.0 #41
  • Upgrade: Bump gh-release from 5.0.2 to 6.0.0 #40
  • Upgrade: Bump codecov/codecov-action from 1 to 1.5.0 #39
  • Upgrade: Bump fs-extra from 9.1.0 to 10.0.0 #38
  • Upgrade: Bump fastify/github-action-merge-dependabot from v1.2.1 to v2.0.0 #33
  • Upgrade: Bump fastify/github-action-merge-dependabot #32
  • Upgrade: Bump fastify/github-action-merge-dependabot from v1.1.1 to v1.2.0 #31
  • Upgrade: Bump actions/setup-node from v2.1.4 to v2.1.5 #30
  • Upgrade: Bump gh-release from 4.0.4 to 5.0.0 #29
  • Upgrade: Bump actions/setup-node from v2.1.3 to v2.1.4 #28
  • Upgrade: Bump actions/setup-node from v2.1.2 to v2.1.3 #27

Fixed

  • Disable override tests on > npm 7 #79

Commits

  • Breaking change: Bump engines to node 16 and npm 8 7d19dd4
  • Add auto merge e598066
  • Update test.yml 96260d6

v5.0.2 - 2020-12-08

Merged

  • Upgrade: Bump ansi-styles from 4.3.0 to 5.0.0 #26
  • Upgrade: Bump actions/checkout from v2.3.3 to v2.3.4 #25

v5.0.1 - 2020-10-24

Commits

  • Fix repo field to a valid format 00b88f8
  • Remove duplicate repo field a2d11ff
  • Update FUNDING.yml 648a541

v5.0.0 - 2020-10-04

Merged

  • report codecov #21
  • Use built in string.padEnd #22
  • Upgrade: Bump fs-extra from 7.0.1 to 9.0.1 #17
  • remove @types/node #20
  • Upgrade: Bump @types/node from 4.9.4 to 14.11.2 #18
  • remove dependency on chalk #19
  • Upgrade: Bump eslint-config-mysticatea from 12.0.0 to 13.0.2 #11
  • Upgrade: Bump rimraf from 2.7.1 to 3.0.2 #10
  • Upgrade: Bump ansi-styles from 3.2.1 to 4.2.1 #12
  • Upgrade: Bump cross-spawn from 6.0.5 to 7.0.3 #9
  • Enable windows testing #15
  • Upgrade: Bump babel-preset-power-assert from 2.0.0 to 3.0.0 #3
  • more renaming #13
  • Upgrade: Bump p-queue from 2.4.2 to 6.6.1 #4
  • Upgrade: Bump nyc from 11.9.0 to 15.1.0 #7
  • Upgrade: Bump pidtree from 0.3.1 to 0.5.0 #5
  • Upgrade: Bump read-pkg from 3.0.0 to 5.2.0 #6
  • Upgrade: Bump mocha from 5.2.0 to 8.1.3 #8
  • Upgrade: Bump actions/setup-node from v2.1.1 to v2.1.2 #1
  • Upgrade: Bump actions/checkout from v2.3.2 to v2.3.3 #2
  • 🐛 fix signal handling #171

Commits

v4.1.5 - 2018-11-24

Commits

v4.1.4 - 2018-11-24

Commits

v4.1.3 - 2018-05-07

Merged

  • Fix: unexpected behavior of leading bang #124
  • Docs: typo fix in README.md: is/are #120
  • Fix: colorize tasks names sequentially instead of by hash #115

Commits

v4.1.2 - 2017-11-07

Fixed

  • Fix: --aggregate-output cannot handle large data (fixes #111)(#112) #111

Commits

  • Chore: fix tests 43a6b16
  • Fix: fix for latest yarn dfb9dcb
  • Fix: missing --aggregate-output in npm-run-all 693261b

v4.1.1 - 2017-08-28

Merged

  • Fix: Use ansi-style directly instead of chalk.styles #108

Commits

  • Chore: configure appveyor to run on only Node 8. ac9358a

v4.1.0 - 2017-08-26

Merged

  • Docs: add note about Yarn compatibility #103
  • Add Node.js 8.x to Travis CI #101
  • Include docs in published npm package. #95

Fixed

  • Fix: MaxListenersExceededWarning (fixes #105) #105
  • New: add --aggregate-output option (fixes #36)(#104) #36

Commits

v4.0.2 - 2017-02-23

Fixed

  • Fix: it threw for --race even if --parallel exists (fixes #88) #88

v4.0.1 - 2017-01-17

Merged

  • Simplify repository config #82
  • Fix Case Sensitive NPM_EXECPATH #84
  • Fixed: typo in help CLI command. #83

Commits

  • NPM_EXECPATH -> npm_execpath, this variable is case sensitive bb9e627
  • Docs: update README.md 6beda60
  • Chore: switch to codecov 378c54b

v4.0.0 - 2017-01-01

Merged

  • Change labels to be displayed in individual colors for each task #75

Fixed

  • Merge pull request #75 from nulltask/feature/colorize (fixes #73) #73

Commits

  • Chore: upgrade eslint and eslint-config 3f933c3
  • New: --max-parallel option 02e9767
  • Breaking: use NPM_EXECPATH to run tasks 12b2b87

v3.1.2 - 2016-12-01

Fixed

  • Fix: remove useless if for old tests (fixes #67) #67
  • Fix: --version command was wrong (fixes #70) #70

Commits

  • Chore: improve tests 4b26037
  • Chore: update travis.yml with dot reporter. 413a7d5
  • Chore: add @types/node 76c7f3d

v3.1.1 - 2016-10-15

Merged

  • fix: use run command instead of run-script #66
  • docs: add hint about forcing chalk coloring #65

v3.1.0 - 2016-09-01

Fixed

  • New: add supporting $npm_config_xxx (fixes #60) #60

Commits

  • Merge pull request #61 from mysticatea/issue60 6a3697d
  • Chore: rename tests: env-check/overwriting → package-config a32ca2f

v3.0.0 - 2016-08-17

Merged

  • Added appveyor support for modern node versions #57

Fixed

  • Breaking: supports default values for argument placeholders (fixes #54) #54

Commits

  • Chore: improve --race tests 58c5df8
  • Chore: try to improve tests for --race 2e5663a
  • Docs: update README.md 1e2b299

v2.3.0 - 2016-06-28

Fixed

  • New: race option (fixes #42) #42

Commits

  • Chore: upgrade my ESLint config. b740e19

v2.2.2 - 2016-06-23

Commits

  • Upgrade: shell-quote 1.6.1 e7ef8cf

v2.2.1 - 2016-06-23

Commits

v2.2.0 - 2016-06-18

Merged

  • Docs: ESLint use --color not --colors #47

Fixed

  • New: add a feature to pass arguments on to each task. (fixes #44) #44

Commits

  • Fix: add tests for argument-passthrough e18ce01
  • Docs: add documents about argument placeholders. c9f69b4
  • Fix: refactor and change Node API for argument-passthrough 49c9e67

v2.1.2 - 2016-06-13

Commits

  • Upgrade: cross-spawn 4.0.0 16603c3

v2.1.1 - 2016-05-19

Fixed

  • Upgrade: cross-spawn-async to cross-spawn (fixes #40) #40

v2.1.0 - 2016-05-13

Commits

  • Update: results of Node API f4ef9f7
  • Fix: invalid jsdoc comments. 32daa0e
  • Fix: results of aborted tasks on linux 4a1bd16

v2.0.0 - 2016-05-11

Merged

  • Build: Add Node 6 to Travis CI #39

Commits

  • Update: add tests for shorthand commands. 4496065
  • Add run-s and run-p commands 40554ef
  • Chore: Stop a use of ES6 modules. And upgrade eslint. 2f26fa5

v1.8.0 - 2016-04-24

Fixed

  • New: --print-name option (fixes #35) #35
  • New: --print-label option (fixes #23) #23

v1.7.0 - 2016-03-30

Fixed

  • Update: --continue-on-error option (fixes #34) #34

v1.6.0 - 2016-03-20

Merged

  • added --serial option as a synonym for sequential #31

Fixed

  • added --serial option as a synonym for sequential #30

Commits

  • Docs: fix help text within 80 columns. b1e6c5a

v1.5.3 - 2016-03-13

Fixed

  • Fix: Add a workaround for Git Bash for Windows (fixes #24) #24

Commits

  • Build: Update appveyor.yml 6585c66

v1.5.2 - 2016-03-08

Fixed

  • Fix: using cross-spawn-async for spaced paths (fixes #26, fixes #27) #26 #27

Commits

v1.5.1 - 2016-01-28

Fixed

  • Fix: came to report unmatched pattern error (fixes #19) #19

Commits

v1.5.0 - 2016-01-17

Commits

v1.4.0 - 2015-12-08

Fixed

  • Add transfaring config overwritten to nested calls (fixes #13) #13

Commits

v1.3.4 - 2015-12-06

Merged

  • Small typo + grammar fixes #16

Commits

  • Fix: Add import "babel-polyfill" for node v0.10 (refs #17) 9253ce9

v1.3.3 - 2015-12-02

Fixed

  • Add notes about the behavior of non-zero-exit (fixes #15) #15

Commits

v1.3.2 - 2015-11-23

Fixed

  • Fix: use ps-tree to kill processes (fixes #14) #14

Commits

  • Added esdoc-importpath-plugin 611a956

v1.3.0 - 2015-11-18

Commits

v1.2.13 - 2015-11-05

Fixed

  • Fix: should not remove duplicate tasks (fixes #12) #12

Commits

  • Upgrade: dependencies daad55f
  • Build: Add tests for Node.js 5 eabd8cf

v1.2.12 - 2015-10-18

Commits

  • Fix: added a support for built-in tasks b287965
  • Update eslint and config 57c917c
  • Update .eslintrc 97fdd8b

v1.2.10 - 2015-09-07

Commits

  • Remove aborting with SIGINT since stdin is inherited. 84bff03

v1.2.9 - 2015-09-07

Commits

  • Add missing .eslintrc for tests 8c38912
  • Update dependencies. 53200d3
  • Fix: a problem around using stdin in tasks (refs #9) f502903

v1.2.8 - 2015-08-26

v1.2.7 - 2015-08-26

Commits

  • Update dependencies. 2520765
  • Fix: Use inherit option (fixes: #8) 736dee0
  • Fix: ignores killed tasks. 76d87cb

v1.2.6 - 2015-06-20

Commits

  • Kill all tasks when one of tasks exited with errors. 87e7864
  • Update dependencies cf60bdf

v1.2.5 - 2015-05-15

Commits

v1.2.4 - 2015-04-26

Commits

  • Update deps and slim down npm-scripts. cd5c8ed

v1.2.3 - 2015-04-19

Commits

v1.2.2 - 2015-04-15

Commits

v1.2.1 - 2015-04-15

Commits

v1.2.0 - 2015-04-15

Commits

  • New feature: glob-like task names. aabe1f9
  • readme improvements ebea491
  • Add about pattern-matching to README.md 864c94f

v1.1.3 - 2015-04-12

Commits

v1.1.2 - 2015-04-05

Commits

v1.1.1 - 2015-03-31

Commits

  • Update version of "npm-run-all" in my package.json db4c554

v1.1.0 - 2015-03-31

Commits

  • New feature: mixied running. 0b04869

v1.0.3 - 2015-03-30

Commits

  • Update README.md 2c19468
  • Trivial fix package.json 4f6020c
  • Update dependencies, and trivial update scripts. 541e581

v1.0.2 - 2015-03-24

Commits

v1.0.1 - 2015-03-24

Commits

v1.0.0 - 2015-03-24

Commits