Last active
September 12, 2018 17:34
-
-
Save JefCurtis/4dab69c5ab868682fee41b0f8c5a9d25 to your computer and use it in GitHub Desktop.
Gmail add-on: Copy Webpack plugin. Hook after emit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const exec = require("child_process").exec; | |
| [...] | |
| module.exports = { | |
| [...] | |
| plugins: [ | |
| [...] | |
| new CopyWebpackPlugin([ | |
| { from: join(root, "config/dev/.clasp.json"), to: ".", ToType: "file" }, | |
| ]), | |
| { | |
| apply: compiler => { | |
| compiler.hooks.afterEmit.tap("AfterEmitPlugin", () => { | |
| exec("yarn push", (_, stdout, stderr) => { | |
| if (stdout) process.stdout.write(stdout); | |
| if (stderr) process.stderr.write(stderr); | |
| }); | |
| }); | |
| }, | |
| }, | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment