@@ -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,13 +40,10 @@ 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- [
45- 'prettier-eslint --write foobar.js',
46- 'eslint --format codeframe foobar.js --fix',
47- ],
48- { stdio: 'inherit', preferLocal: true, concurrency: 1 },
49- );
43+ await exec([
44+ 'prettier-eslint --write foobar.js',
45+ 'eslint --format codeframe foobar.js --fix'
46+ ], { stdio: 'inherit', preferLocal: true, concurrency: 1 });
5047}
5148
5249main();
@@ -59,7 +56,7 @@ Similar to `exec`, but also **can** access the system's environment variables fr
5956** Signature **
6057
6158` ` ` ts
62- function(cmds, options)
59+ function(cmds, options)
6360` ` `
6461
6562** Params **
@@ -68,6 +65,8 @@ function(cmds, options)
6865- ` options ` - directly passed to ` execa `
6966- ` returns ` - resolved or rejected promises
7067
68+
69+
7170** Example **
7271
7372` ` ` js
@@ -77,13 +76,18 @@ import { shell } from '@tunnckocore/execa';
7776
7877async function main() {
7978 // executes in series
80- await shell(['echo unicorns', 'echo "foo-$HOME-bar"', 'echo dragons'], {
81- stdio: 'inherit',
82- });
79+ await shell([
80+ 'echo unicorns',
81+ 'echo "foo-$HOME-bar"',
82+ 'echo dragons'
83+ ], { stdio: 'inherit' });
8384
8485 // exits with code 3
8586 try {
86- await shell(['exit 3', 'echo nah']);
87+ await shell([
88+ 'exit 3',
89+ 'echo nah'
90+ ]);
8791 } catch (er) {
8892 console.error(er);
8993 // => {
@@ -110,7 +114,7 @@ Think of this as a mix of `child_process.execFile()` and `child_process.spawn()`
110114** Signature **
111115
112116` ` ` ts
113- function(file, args, options)
117+ function(file, args, options)
114118` ` `
115119
116120** Params **
@@ -119,10 +123,12 @@ function(file, args, options)
119123- ` args ` - arguments / flags to be passed to ` file `
120124- ` options ` - optional options , passed to ` child_process ` ' s methods
121125
126+
127+
122128** Example **
123129
124130` ` ` js
125- import execa from '@tunnckocore/execa';
131+ import execa from '@tunnckocore/execa'
126132// or
127133// const execa = require('@tunnckocore/execa');
128134
@@ -134,3 +140,5 @@ main();
134140` ` `
135141
136142< ! -- docks - end -- >
143+
144+
0 commit comments