We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8f0f62 commit 5c17a0dCopy full SHA for 5c17a0d
src/index.js
@@ -3,11 +3,11 @@ import pMapSeries from 'p-map-series'
3
4
const PLUGIN_NAME = 'HooksShellScriptsPlugin'
5
6
-const execute = script =>
7
- execa.shell(script).then(({ stdout, stderr }) => {
8
- if (stdout) process.stdout.write(stdout)
9
- if (stderr) process.stderr.write(stderr)
10
- })
+const execute = async script => {
+ const { stdout, stderr } = await execa.shell(script)
+ if (stdout) process.stdout.write(stdout)
+ if (stderr) process.stderr.write(stderr)
+}
11
12
const registerHook = compiler => ([hook, scripts]) =>
13
compiler.hooks[hook].tap(PLUGIN_NAME, () => pMapSeries(scripts, execute))
0 commit comments