mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
wait wait wait no no no
This commit is contained in:
1 parent
bf61cb17de
commit
f39d1bab4e
2 files changed
+10
-17
No files matched your search
@@ -78,4 +78,4 @@ const interval = setInterval(async () => {
|
||||
error,
|
||||
);
|
||||
}
|
||||
}, 5000);
|
||||
}, 15000);
|
||||
@@ -1,15 +1,10 @@
|
||||
import { build } from "esbuild";
|
||||
import { cp, readdir, rm } from "fs/promises";
|
||||
import { argv } from "process";
|
||||
|
||||
const dev = argv.includes("--dev");
|
||||
|
||||
const projectDir = "../..";
|
||||
const srcRoot = `${projectDir}/packages/bot`;
|
||||
const distRoot = `${projectDir}/dist/bot`;
|
||||
const modulesRoot = dev
|
||||
? "../../packages/bot/node_modules"
|
||||
: "../../node_modules";
|
||||
const modulesRoot = "../../node_modules";
|
||||
const workers = await readdir(`${srcRoot}/src/workers`);
|
||||
|
||||
await rm(distRoot, { recursive: true, force: true });
|
||||
@@ -30,9 +25,9 @@ build({
|
||||
},
|
||||
external: ["sharp"],
|
||||
minifyIdentifiers: false, // causes goofy ahh issues
|
||||
minifySyntax: !dev,
|
||||
minifyWhitespace: !dev,
|
||||
sourcemap: !dev,
|
||||
minifySyntax: true,
|
||||
minifyWhitespace: true,
|
||||
sourcemap: true,
|
||||
jsxImportSource: "react",
|
||||
jsx: "automatic",
|
||||
});
|
||||
@@ -50,12 +45,10 @@ for (const module of await readdir(`${modulesRoot}/@resvg`)) {
|
||||
);
|
||||
}
|
||||
|
||||
if (!dev) {
|
||||
await cp(`${projectDir}/prisma`, `${distRoot}/prisma`, { recursive: true });
|
||||
await cp(`${projectDir}/prisma`, `${distRoot}/prisma`, { recursive: true });
|
||||
|
||||
for (const file of await readdir(`${modulesRoot}/prisma`).then((files) =>
|
||||
files.filter((file) => file.endsWith(".node")),
|
||||
)) {
|
||||
cp(`${modulesRoot}/prisma/${file}`, `${distRoot}/prisma/${file}`);
|
||||
}
|
||||
for (const file of await readdir(`${modulesRoot}/prisma`).then((files) =>
|
||||
files.filter((file) => file.endsWith(".node")),
|
||||
)) {
|
||||
cp(`${modulesRoot}/prisma/${file}`, `${distRoot}/prisma/${file}`);
|
||||
}
|
||||
Reference in new issue
Block a user