Fix semicolons and spaces in documentation examples (#547)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by ehmicky · committed by GitHub · parent db2ad9a · Browse files · 2 files·+14 added−14 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+14 added−14 removed
- other:+14 added−14 removed
Provenance
- Commit
b260fa4- Tree
bc1b3e1- Author
ehmicky <ehmicky@users.noreply.github.com>- Committer
GitHub <noreply@github.com>- Parent
db2ad9a
2 files changed+14 added−14 removed
modified:index.d.ts+9 added-9 removed
535 unmodified lines536 // Similar to `echo unicorns 2> stdout.txt` in Bash537 await execa('echo', ['unicorns']).pipeStderr('stderr.txt');538 539 // Similar to `echo unicorns &> stdout.txt` in Bash540-await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');540+await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');541 ```542 543 @example <caption>Redirect input from a file</caption>544 ```545 import {execa} from 'execa';546 547 // Similar to `cat < stdin.txt` in Bash548-const {stdout} = await execa('cat', {inputFile:'stdin.txt'});548+const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});549 console.log(stdout);550 //=> 'unicorns'551 ```552 94 unmodified lines647 ```648 import {execa} from 'execa';649 650 // Similar to `cat < stdin.txt` in Bash651-const {stdout} = execaSync('cat', {inputFile:'stdin.txt'});651+const {stdout} = execaSync('cat', {inputFile: 'stdin.txt'});652 console.log(stdout);653 //=> 'unicorns'654 ```655 137 unmodified lines793 @example <caption>Basic</caption>794 ```795 import {$} from 'execa';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 ```800 801 @example <caption>Multiple arguments</caption>802 ```803 import {$} from 'execa';804 805- const args = ['unicorns', '&', 'rainbows!']805+ const args = ['unicorns', '&', 'rainbows!'];806 const {stdout} = $.sync`echo ${args}`;807 console.log(stdout);808 //=> 'unicorns & rainbows!'809 ```42 unmodified lines852 @example <caption>Basic</caption>853 ```854 import {$} from 'execa';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 ```859 860 @example <caption>Multiple arguments</caption>861 ```862 import {$} from 'execa';863 864-const args = ['unicorns', '&', 'rainbows!']864+const args = ['unicorns', '&', 'rainbows!'];865 const {stdout} = await $`echo ${args}`;866 console.log(stdout);867 //=> 'unicorns & rainbows!'868 ```62 unmodified linesmodified:readme.md+5 added-5 removed
51 unmodified lines52 53 ```js54 import {$} from 'execa';55 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}`;58 ```59 60 #### Multiple arguments61 62 ```js63 import {$} from 'execa';64 65-const args = ['unicorns', '&', 'rainbows!']65+const args = ['unicorns', '&', 'rainbows!'];66 const {stdout} = await $`echo ${args}`;67 console.log(stdout);68 //=> 'unicorns & rainbows!'69 ```48 unmodified lines118 // Similar to `echo unicorns 2> stdout.txt` in Bash119 await execa('echo', ['unicorns']).pipeStderr('stderr.txt');120 121 // Similar to `echo unicorns &> stdout.txt` in Bash122-await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');122+await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');123 ```124 125 #### Redirect input from a file126 127 ```js128 import {execa} from 'execa';129 130 // Similar to `cat < stdin.txt` in Bash131-const {stdout} = await execa('cat', {inputFile:'stdin.txt'});131+const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});132 console.log(stdout);133 //=> 'unicorns'134 ```135 651 unmodified lines