Skip to content
Myr

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

2 files+14 added−14 removed

modified:index.d.ts+9 added-9 removed
535 unmodified lines
536// Similar to `echo unicorns 2> stdout.txt` in Bash537await execa('echo', ['unicorns']).pipeStderr('stderr.txt');538539// Similar to `echo unicorns &> stdout.txt` in Bash540await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');540await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');541```542543@example <caption>Redirect input from a file</caption>544```545import {execa} from 'execa';546547// Similar to `cat < stdin.txt` in Bash548const {stdout} = await execa('cat', {inputFile:'stdin.txt'});548const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});549console.log(stdout);550//=> 'unicorns'551```552
94 unmodified lines
647```648import {execa} from 'execa';649650// Similar to `cat < stdin.txt` in Bash651const {stdout} = execaSync('cat', {inputFile:'stdin.txt'});651const {stdout} = execaSync('cat', {inputFile: 'stdin.txt'});652console.log(stdout);653//=> 'unicorns'654```655
137 unmodified lines
793 @example <caption>Basic</caption>794 ```795 import {$} from 'execa';796797 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 ```800801 @example <caption>Multiple arguments</caption>802 ```803 import {$} from 'execa';804805 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 lines
852@example <caption>Basic</caption>853```854import {$} from 'execa';855856const branch = await $`git branch --show-current`857await $`dep deploy --branch=${branch}`856const branch = await $`git branch --show-current`;857await $`dep deploy --branch=${branch}`;858```859860@example <caption>Multiple arguments</caption>861```862import {$} from 'execa';863864const args = ['unicorns', '&', 'rainbows!']864const args = ['unicorns', '&', 'rainbows!'];865const {stdout} = await $`echo ${args}`;866console.log(stdout);867//=> 'unicorns & rainbows!'868```
62 unmodified lines
modified:readme.md+5 added-5 removed
51 unmodified lines
5253```js54import {$} from 'execa';5556const branch = await $`git branch --show-current`57await $`dep deploy --branch=${branch}`56const branch = await $`git branch --show-current`;57await $`dep deploy --branch=${branch}`;58```5960#### Multiple arguments6162```js63import {$} from 'execa';6465const args = ['unicorns', '&', 'rainbows!']65const args = ['unicorns', '&', 'rainbows!'];66const {stdout} = await $`echo ${args}`;67console.log(stdout);68//=> 'unicorns & rainbows!'69```
48 unmodified lines
118// Similar to `echo unicorns 2> stdout.txt` in Bash119await execa('echo', ['unicorns']).pipeStderr('stderr.txt');120121// Similar to `echo unicorns &> stdout.txt` in Bash122await execa('echo', ['unicorns'], {all:true}).pipeAll('all.txt');122await execa('echo', ['unicorns'], {all: true}).pipeAll('all.txt');123```124125#### Redirect input from a file126127```js128import {execa} from 'execa';129130// Similar to `cat < stdin.txt` in Bash131const {stdout} = await execa('cat', {inputFile:'stdin.txt'});131const {stdout} = await execa('cat', {inputFile: 'stdin.txt'});132console.log(stdout);133//=> 'unicorns'134```135
651 unmodified lines