@@ -17,7 +17,7 @@ instead of in parallel which is the default behavior.
1717** Signature**
1818
1919``` ts
20- function (cmds , options )
20+ function (cmds , options )
2121```
2222
2323** Params **
@@ -27,7 +27,7 @@ function(cmds, options)
2727- ` returns ` - resolved or rejected promises
2828
2929> It also can accept array of multiple strings of commands that will be
30- executed in series or in parallel (default ).
30+ > executed in series or in parallel (default ).
3131
3232** Example **
3333
@@ -40,10 +40,13 @@ async function main() {
4040 await exec('echo "hello world"', { stdio: 'inherit' });
4141
4242 // executes in series (because ` concurrency ` option is set to ` 1 ` )
43- await exec([
44- 'prettier-eslint --write foobar.js',
45- 'eslint --format codeframe foobar.js --fix'
46- ], { stdio: 'inherit', preferLocal: true, concurrency: 1 });
43+ await exec(
44+ [
45+ 'prettier-eslint --write foobar.js',
46+ 'eslint --format codeframe foobar.js --fix',
47+ ],
48+ { stdio: 'inherit', preferLocal: true, concurrency: 1 },
49+ );
4750}
4851
4952main();
@@ -56,7 +59,7 @@ Similar to `exec`, but also **can** access the system's environment variables fr
5659** Signature **
5760
5861` ` ` ts
59- function(cmds, options)
62+ function(cmds, options)
6063` ` `
6164
6265** Params **
@@ -65,8 +68,6 @@ function(cmds, options)
6568- ` options ` - directly passed to ` execa `
6669- ` returns ` - resolved or rejected promises
6770
68-
69-
7071** Example **
7172
7273` ` ` js
@@ -76,18 +77,13 @@ import { shell } from '@tunnckocore/execa';
7677
7778async function main() {
7879 // executes in series
79- await shell([
80- 'echo unicorns',
81- 'echo "foo-$HOME-bar"',
82- 'echo dragons'
83- ], { stdio: 'inherit' });
80+ await shell(['echo unicorns', 'echo "foo-$HOME-bar"', 'echo dragons'], {
81+ stdio: 'inherit',
82+ });
8483
8584 // exits with code 3
8685 try {
87- await shell([
88- 'exit 3',
89- 'echo nah'
90- ]);
86+ await shell(['exit 3', 'echo nah']);
9187 } catch (er) {
9288 console.error(er);
9389 // => {
@@ -114,7 +110,7 @@ Think of this as a mix of `child_process.execFile()` and `child_process.spawn()`
114110** Signature **
115111
116112` ` ` ts
117- function(file, args, options)
113+ function(file, args, options)
118114` ` `
119115
120116** Params **
@@ -123,12 +119,10 @@ function(file, args, options)
123119- ` args ` - arguments / flags to be passed to ` file `
124120- ` options ` - optional options , passed to ` child_process ` ' s methods
125121
126-
127-
128122** Example **
129123
130124` ` ` js
131- import execa from '@tunnckocore/execa'
125+ import execa from '@tunnckocore/execa';
132126// or
133127// const execa = require('@tunnckocore/execa');
134128
@@ -140,5 +134,3 @@ main();
140134` ` `
141135
142136< ! -- docks - end -- >
143-
144-
0 commit comments