MCPcopy Index your code
hub / github.com/tkirda/jQuery-Autocomplete / buildUmd

Function buildUmd

scripts/build.mjs:60–74  ·  view source on GitHub ↗
(outfile, minify)

Source from the content-addressed store, hash-verified

58// the UMD detection shim above. `$` inside umd-body.ts is a free reference
59// that binds to the factory parameter at runtime.
60async function buildUmd(outfile, minify) {
61 const result = await esbuild({
62 entryPoints: [path("src/umd-body.ts")],
63 bundle: true,
64 write: false,
65 format: "iife",
66 target: "es2020",
67 minify,
68 legalComments: "none",
69 });
70 const body = result.outputFiles[0].text;
71 const wrapped = banner + "\n" + umdHead + body + umdTail;
72 console.log(`Building: ${outfile}`);
73 await writeFile(outfile, wrapped);
74}
75
76await buildUmd(path("dist/jquery.autocomplete.js"), false);
77await buildUmd(path("dist/jquery.autocomplete.min.js"), true);

Callers 1

build.mjsFile · 0.85

Calls 1

pathFunction · 0.85

Tested by

no test coverage detected