Skip to content

Commit 5f5d26f

Browse files
committed
added --serial option as a synonym for sequential
Fixed #30
1 parent 9aa2a2d commit 5f5d26f

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Coverage Status](https://coveralls.io/repos/mysticatea/npm-run-all/badge.svg?branch=master&service=github)](https://coveralls.io/github/mysticatea/npm-run-all?branch=master)
88
[![Dependency Status](https://david-dm.org/mysticatea/npm-run-all.svg)](https://david-dm.org/mysticatea/npm-run-all)
99

10-
A CLI tool to run multiple npm-scripts in parallel or sequential.
10+
A CLI tool to run multiple npm-scripts in parallel or sequential / serial.
1111

1212
```
1313
> npm-run-all clean lint build:*
@@ -40,12 +40,12 @@ Usage: npm-run-all [OPTIONS] [...tasks]
4040
Options:
4141
-h, --help Print this text.
4242
-p, --parallel [...tasks] Run a group of tasks in parallel.
43-
-s, --sequential [...tasks] Run a group of tasks sequentially.
43+
-s, --sequential / --serial [...tasks] Run a group of tasks sequentially / serially.
4444
-v, --version Print version number.
4545
--silent Set "silent" to the log level of npm.
4646
```
4747

48-
### Run tasks sequentially
48+
### Run tasks sequentially / serially
4949

5050
```
5151
npm-run-all build:html build:js
@@ -72,16 +72,21 @@ Of course, this works on **Windows** as well!
7272
npm-run-all clean lint --parallel watch:html watch:js
7373
```
7474

75-
1. First, this runs `clean` and `lint` sequentially.
75+
1. First, this runs `clean` and `lint` sequentially / serially.
7676
2. Next, runs `watch:html` and `watch:js` in parallell.
7777

7878
```
7979
npm-run-all a b --parallel c d --sequential e f --parallel g h i
8080
```
81+
or
8182

82-
1. First, runs `a` and `b` sequentially.
83+
```
84+
npm-run-all a b --parallel c d --serial e f --parallel g h i
85+
```
86+
87+
1. First, runs `a` and `b` sequentially / serially.
8388
2. Second, runs `c` and `d` in parallell.
84-
3. Third, runs `e` and `f` sequentially.
89+
3. Third, runs `e` and `f` sequentially / serially.
8590
4. Lastly, runs `g`, `h`, and `i` in parallell.
8691

8792
### Run with arguments

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "npm-run-all",
33
"version": "1.5.3",
4-
"description": "A CLI tool to run multiple npm-scripts in parallel or sequential.",
4+
"description": "A CLI tool to run multiple npm-scripts in parallel or sequential / serial.",
55
"bin": "bin/npm-run-all.js",
66
"files": [
77
"bin",
@@ -59,6 +59,7 @@
5959
"npm-scripts",
6060
"run",
6161
"sequential",
62+
"serial",
6263
"parallel",
6364
"task"
6465
],

src/bin/help.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Usage: npm-run-all [OPTIONS] [...tasks]
2020
Options:
2121
-h, --help Print this text.
2222
-p, --parallel [...tasks] Run a group of tasks in parallel.
23-
-s, --sequential [...tasks] Run a group of tasks in sequencial.
23+
-s, --sequential / --serial [...tasks] Run a group of tasks in sequencial / serial.
2424
-v, --version Print version number.
2525
--silent Set "silent" to the log level of npm.
2626

src/bin/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ function parse(args) {
6363
switch (arg) {
6464
case "-s":
6565
case "--sequential":
66+
case "--serial":
6667
if (queue[queue.length - 1].parallel) {
6768
queue.push({parallel: false, patterns: [], packageConfig});
6869
}

test/mixed.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe("[mixed] npm-run-all", () => {
1010

1111
beforeEach(removeResult);
1212

13-
it("should run a mix of sequential and parallel tasks (has the default group):", () =>
13+
it("should run a mix of sequential / serial and parallel tasks (has the default group):", () =>
1414
command([
1515
"test-task:append a",
1616
"-p", "test-task:append b", "test-task:append c",
@@ -25,7 +25,7 @@ describe("[mixed] npm-run-all", () => {
2525
})
2626
);
2727

28-
it("should run a mix of sequential and parallel tasks (doesn't have the default group):", () =>
28+
it("should run a mix of sequential / serial and parallel tasks (doesn't have the default group):", () =>
2929
command([
3030
"-p", "test-task:append b", "test-task:append c",
3131
"-s", "test-task:append d", "test-task:append e"

test/sequential.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ describe("[sequencial] npm-run-all", () => {
1212

1313
beforeEach(removeResult);
1414

15-
describe("should run tasks on sequential:", () => {
15+
describe("should run tasks sequentially / serially:", () => {
1616
it("lib version", () =>
1717
runAll(["test-task:append a", "test-task:append b"], {parallel: false})
1818
.then(() => {

0 commit comments

Comments
 (0)