mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
feat: dev flags
This commit is contained in:
1 parent
c81f6d08c0
commit
e091cf5d06
2 files changed
+7
-3
No files matched your search
@@ -1,10 +1,12 @@
|
||||
import { build } from 'esbuild';
|
||||
import { cp, readdir, rm } from 'fs/promises';
|
||||
import { argv } from 'process';
|
||||
|
||||
const srcRoot = '../bot';
|
||||
const distRoot = '../../dist/bot';
|
||||
const modulesRoot = '../../node_modules';
|
||||
const workers = await readdir(`${srcRoot}/src/workers`);
|
||||
const dev = argv.includes('--dev');
|
||||
|
||||
await rm(distRoot, { recursive: true, force: true });
|
||||
|
||||
@@ -21,8 +23,10 @@ build({
|
||||
'.ttf': 'file',
|
||||
'.node': 'empty',
|
||||
},
|
||||
minify: true,
|
||||
sourcemap: true,
|
||||
minifyIdentifiers: false, // causes goofy ahh issues
|
||||
minifySyntax: !dev,
|
||||
minifyWhitespace: !dev,
|
||||
sourcemap: !dev,
|
||||
});
|
||||
|
||||
await Promise.all(
|
||||
|
||||
Reference in new issue
Block a user