Skip to content

Commit b260fa4

Browse files
authored
Fix semicolons and spaces in documentation examples (#547)
1 parent db2ad9a commit b260fa4

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

index.d.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -537,15 +537,15 @@ await execa('echo', ['unicorns']).pipeStdout('stdout.txt');
537537
await execa('echo', ['unicorns']).pipeStderr('stderr.txt');
538538
539539
// Similar to `echo unicorns &> stdout.txt` in Bash
540-
await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');
540+
await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');
541541
```
542542
543543
@example <caption>Redirect input from a file</caption>
544544
```
545545
import {execa} from 'execa';
546546
547547
// Similar to `cat < stdin.txt` in Bash
548-
const {stdout} = await execa('cat', {inputFile:'stdin.txt'});
548+
const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});
549549
console.log(stdout);
550550
//=> 'unicorns'
551551
```
@@ -648,7 +648,7 @@ console.log(stdout);
648648
import {execa} from 'execa';
649649
650650
// Similar to `cat < stdin.txt` in Bash
651-
const {stdout} = execaSync('cat', {inputFile:'stdin.txt'});
651+
const {stdout} = execaSync('cat', {inputFile: 'stdin.txt'});
652652
console.log(stdout);
653653
//=> 'unicorns'
654654
```
@@ -794,15 +794,15 @@ type Execa$<StdoutStderrType extends StdoutStderrAll = string> = {
794794
```
795795
import {$} from 'execa';
796796
797-
const branch = $.sync`git branch --show-current`
798-
$.sync`dep deploy --branch=${branch}`
797+
const branch = $.sync`git branch --show-current`;
798+
$.sync`dep deploy --branch=${branch}`;
799799
```
800800
801801
@example <caption>Multiple arguments</caption>
802802
```
803803
import {$} from 'execa';
804804
805-
const args = ['unicorns', '&', 'rainbows!']
805+
const args = ['unicorns', '&', 'rainbows!'];
806806
const {stdout} = $.sync`echo ${args}`;
807807
console.log(stdout);
808808
//=> 'unicorns & rainbows!'
@@ -853,15 +853,15 @@ The `command` string can inject any `${value}` with the following types: string,
853853
```
854854
import {$} from 'execa';
855855
856-
const branch = await $`git branch --show-current`
857-
await $`dep deploy --branch=${branch}`
856+
const branch = await $`git branch --show-current`;
857+
await $`dep deploy --branch=${branch}`;
858858
```
859859
860860
@example <caption>Multiple arguments</caption>
861861
```
862862
import {$} from 'execa';
863863
864-
const args = ['unicorns', '&', 'rainbows!']
864+
const args = ['unicorns', '&', 'rainbows!'];
865865
const {stdout} = await $`echo ${args}`;
866866
console.log(stdout);
867867
//=> 'unicorns & rainbows!'

readme.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@ For more information about Execa scripts, please see [this page](docs/scripts.md
5353
```js
5454
import {$} from 'execa';
5555

56-
const branch = await $`git branch --show-current`
57-
await $`dep deploy --branch=${branch}`
56+
const branch = await $`git branch --show-current`;
57+
await $`dep deploy --branch=${branch}`;
5858
```
5959

6060
#### Multiple arguments
6161

6262
```js
6363
import {$} from 'execa';
6464

65-
const args = ['unicorns', '&', 'rainbows!']
65+
const args = ['unicorns', '&', 'rainbows!'];
6666
const {stdout} = await $`echo ${args}`;
6767
console.log(stdout);
6868
//=> 'unicorns & rainbows!'
@@ -119,7 +119,7 @@ await execa('echo', ['unicorns']).pipeStdout('stdout.txt');
119119
await execa('echo', ['unicorns']).pipeStderr('stderr.txt');
120120

121121
// Similar to `echo unicorns &> stdout.txt` in Bash
122-
await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');
122+
await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');
123123
```
124124

125125
#### Redirect input from a file
@@ -128,7 +128,7 @@ await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');
128128
import {execa} from 'execa';
129129

130130
// Similar to `cat < stdin.txt` in Bash
131-
const {stdout} = await execa('cat', {inputFile:'stdin.txt'});
131+
const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});
132132
console.log(stdout);
133133
//=> 'unicorns'
134134
```

0 commit comments

Comments
 (0)