UNPKG

3.06 kBMarkdownView Raw
1| index | [npm-run-all] | [run-s] | [run-p] | [Node API] |
2|-------|---------------|---------|---------|------------|
3
4# npm-run-all
5
6[![npm version](https://img.shields.io/npm/v/npm-run-all.svg)](https://www.npmjs.com/package/npm-run-all)
7[![Downloads/month](https://img.shields.io/npm/dm/npm-run-all.svg)](http://www.npmtrends.com/npm-run-all)
8[![Build Status](https://travis-ci.org/mysticatea/npm-run-all.svg?branch=master)](https://travis-ci.org/mysticatea/npm-run-all)
9[![Build status](https://ci.appveyor.com/api/projects/status/v0owd44q1r7hceir/branch/master?svg=true)](https://ci.appveyor.com/project/mysticatea/npm-run-all/branch/master)
10[![Coverage Status](https://codecov.io/gh/mysticatea/eslint-plugin-node/branch/master/graph/badge.svg)](https://codecov.io/gh/mysticatea/npm-run-all)
11[![Dependency Status](https://david-dm.org/mysticatea/npm-run-all.svg)](https://david-dm.org/mysticatea/npm-run-all)
12
13A CLI tool to run multiple npm-scripts in parallel or sequential.
14
15## ⤴️ Motivation
16
17- **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.<br>
18 Before: `npm run clean && npm run build:css && npm run build:js && npm run build:html`<br>
19 After: `npm-run-all clean build:*`
20- **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 is using it on Windows, so the use of `&` might block contributions. `npm-run-all --parallel` works well on Windows as well.
21
22## 💿 Installation
23
24```bash
25$ npm install npm-run-all --save-dev
26# or
27$ yarn add npm-run-all --dev
28```
29
30- It requires `Node@>=4`.
31
32## 📖 Usage
33
34### CLI Commands
35
36This `npm-run-all` package provides 3 CLI commands.
37
38- [npm-run-all]
39- [run-s]
40- [run-p]
41
42The main command is [npm-run-all].
43We can make complex plans with [npm-run-all] command.
44
45Both [run-s] and [run-p] are shorthand commands.
46[run-s] is for sequential, [run-p] is for parallel.
47We can make simple plans with those commands.
48
49#### Yarn Compatibility
50
51If a script is invoked with Yarn, `npm-run-all` will correctly use Yarn to execute the plan's child scripts.
52
53### Node API
54
55This `npm-run-all` package provides Node API.
56
57- [Node API]
58
59## 📰 Changelog
60
61- https://github.com/mysticatea/npm-run-all/releases
62
63## 🍻 Contributing
64
65Welcome♡
66
67### Bug Reports or Feature Requests
68
69Please use GitHub Issues.
70
71### Correct Documents
72
73Please use GitHub Pull Requests.
74
75I'm not familiar with English, so I especially thank you for documents' corrections.
76
77### Implementing
78
79Please use GitHub Pull Requests.
80
81There are some npm-scripts to help developments.
82
83- **npm test** - Run tests and collect coverage.
84- **npm run clean** - Delete temporary files.
85- **npm run lint** - Run ESLint.
86- **npm run watch** - Run tests (not collect coverage) on every file change.
87
88[npm-run-all]: docs/npm-run-all.md
89[run-s]: docs/run-s.md
90[run-p]: docs/run-p.md
91[Node API]: docs/node-api.md