MCPcopy Create free account
hub / github.com/Ray-D-Song/lexe / buildLibrary

Function buildLibrary

build.mjs:548–581  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

546}
547
548async function buildLibrary() {
549 const defaultLibEsBuildOption = {
550 chunkNames: "llrt-[name]-runtime-[hash]",
551 ...ES_BUILD_OPTIONS,
552 splitting: false,
553 keepNames: true,
554 nodePaths: ["."],
555 };
556
557 // Build lib
558 const entryPoints = {};
559 ENTRYPOINTS.forEach((entry) => {
560 entryPoints[entry] = path.join(SRC_DIR, entry);
561 });
562 await esbuild.build({
563 ...defaultLibEsBuildOption,
564 entryPoints,
565 plugins: [requireProcessPlugin],
566 });
567
568 // Build tests
569 const testEntryPoints = TEST_FILES.reduce((acc, entry) => {
570 const { name, dir } = path.parse(entry);
571 const parentDir = path.basename(dir);
572 acc[path.join("__tests__", parentDir, name)] = entry;
573 return acc;
574 }, {});
575
576 await esbuild.build({
577 ...defaultLibEsBuildOption,
578 entryPoints: testEntryPoints,
579 external: [...ES_BUILD_OPTIONS.external, "@aws-sdk", "@smithy"],
580 });
581}
582
583async function buildSdks() {
584 const sdkEntryList = await Promise.all(

Callers 1

build.mjsFile · 0.85

Calls 4

joinMethod · 0.80
buildMethod · 0.80
basenameMethod · 0.80
parseMethod · 0.65

Tested by

no test coverage detected