@@ -537,15 +537,15 @@ await execa('echo', ['unicorns']).pipeStdout('stdout.txt');
537
537
await execa('echo', ['unicorns']).pipeStderr('stderr.txt');
538
538
539
539
// 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');
541
541
```
542
542
543
543
@example <caption>Redirect input from a file</caption>
544
544
```
545
545
import {execa} from 'execa';
546
546
547
547
// 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'});
549
549
console.log(stdout);
550
550
//=> 'unicorns'
551
551
```
@@ -648,7 +648,7 @@ console.log(stdout);
648
648
import {execa} from 'execa';
649
649
650
650
// Similar to `cat < stdin.txt` in Bash
651
- const {stdout} = execaSync('cat', {inputFile:'stdin.txt'});
651
+ const {stdout} = execaSync('cat', {inputFile: 'stdin.txt'});
652
652
console.log(stdout);
653
653
//=> 'unicorns'
654
654
```
@@ -794,15 +794,15 @@ type Execa$<StdoutStderrType extends StdoutStderrAll = string> = {
794
794
```
795
795
import {$} from 'execa';
796
796
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}`;
799
799
```
800
800
801
801
@example <caption>Multiple arguments</caption>
802
802
```
803
803
import {$} from 'execa';
804
804
805
- const args = ['unicorns', '&', 'rainbows!']
805
+ const args = ['unicorns', '&', 'rainbows!'];
806
806
const {stdout} = $.sync`echo ${args}`;
807
807
console.log(stdout);
808
808
//=> 'unicorns & rainbows!'
@@ -853,15 +853,15 @@ The `command` string can inject any `${value}` with the following types: string,
853
853
```
854
854
import {$} from 'execa';
855
855
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}`;
858
858
```
859
859
860
860
@example <caption>Multiple arguments</caption>
861
861
```
862
862
import {$} from 'execa';
863
863
864
- const args = ['unicorns', '&', 'rainbows!']
864
+ const args = ['unicorns', '&', 'rainbows!'];
865
865
const {stdout} = await $`echo ${args}`;
866
866
console.log(stdout);
867
867
//=> 'unicorns & rainbows!'
0 commit comments