MCPcopy Create free account
hub / github.com/testing-library/user-event / buildLib

Function buildLib

scripts/setup.js:92–105  ·  view source on GitHub ↗
(name, dir)

Source from the content-addressed store, hash-verified

90}
91
92async 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
107async function buildEnv(name, file) {
108 process.stdout.write(`Bundling environment "${name}" at ${file}\n`)

Callers 1

setup.jsFile · 0.85

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected