* @param {string} target the platform to bundle for
(target)
| 81 | * @param {string} target the platform to bundle for |
| 82 | */ |
| 83 | async function bundleBinary(target) { |
| 84 | const child = fork(__filename, { stdio: "inherit" }); |
| 85 | child.send({ |
| 86 | payload: { |
| 87 | target, |
| 88 | }, |
| 89 | }); |
| 90 | return new Promise((resolve, reject) => { |
| 91 | child.on("message", (msg) => { |
| 92 | if (msg.error) { |
| 93 | reject(); |
| 94 | } else { |
| 95 | resolve(); |
| 96 | } |
| 97 | }); |
| 98 | }); |
| 99 | } |
| 100 | |
| 101 | module.exports = { |
| 102 | bundleBinary, |