(name, dir)
| 90 | } |
| 91 | |
| 92 | async function buildLib(name, dir) { |
| 93 | const {globals} = JSON.parse(await fs.readFile(`${dir}/package.json`)) |
| 94 | |
| 95 | process.stdout.write(`Bundling library "${name}" at ${dir}/index.js\n`) |
| 96 | |
| 97 | await esbuild.build({ |
| 98 | entryPoints: [`${dir}/index.js`], |
| 99 | outfile: `${dir}/index.bundle.js`, |
| 100 | bundle: true, |
| 101 | plugins: [ |
| 102 | pluginGlobals(globals), |
| 103 | ], |
| 104 | }) |
| 105 | } |
| 106 | |
| 107 | async function buildEnv(name, file) { |
| 108 | process.stdout.write(`Bundling environment "${name}" at ${file}\n`) |