MCPcopy Create free account
hub / github.com/Donnadieu/Epstein-File-Explorer / buildAll

Function buildAll

script/build.ts:36–116  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34];
35
36async function buildAll() {
37 await rm("dist", { recursive: true, force: true });
38
39 console.log("building client...");
40 await viteBuild();
41
42 console.log("building server...");
43 const pkg = JSON.parse(await readFile("package.json", "utf-8"));
44 const allDeps = [
45 ...Object.keys(pkg.dependencies || {}),
46 ...Object.keys(pkg.devDependencies || {}),
47 ];
48 const externals = allDeps.filter((dep) => !allowlist.includes(dep));
49
50 await esbuild({
51 entryPoints: ["server/index.ts"],
52 platform: "node",
53 bundle: true,
54 format: "cjs",
55 outfile: "dist/index.cjs",
56 define: {
57 "process.env.NODE_ENV": '"production"',
58 },
59 minify: true,
60 external: externals,
61 logLevel: "info",
62 });
63
64 console.log("building pipeline...");
65 await esbuild({
66 entryPoints: ["scripts/pipeline/run-pipeline.ts"],
67 platform: "node",
68 bundle: true,
69 format: "cjs",
70 outfile: "dist/pipeline.cjs",
71 banner: {
72 js: 'var __pipeline_import_meta_url=require("url").pathToFileURL(require("path").join(process.cwd(),"scripts","pipeline","__bundled.cjs")).href;',
73 },
74 define: {
75 "import.meta.url": "__pipeline_import_meta_url",
76 "process.env.NODE_ENV": '"production"',
77 },
78 minify: true,
79 external: externals,
80 logLevel: "info",
81 });
82
83 console.log("building tag-resolved...");
84 await esbuild({
85 entryPoints: ["scripts/pipeline/tag-resolved.ts"],
86 platform: "node",
87 bundle: true,
88 format: "cjs",
89 outfile: "dist/tag-resolved.cjs",
90 banner: {
91 js: 'var __pipeline_import_meta_url=require("url").pathToFileURL(require("path").join(process.cwd(),"scripts","pipeline","__bundled.cjs")).href;',
92 },
93 define: {

Callers 1

build.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected