mirror of
https://github.com/zumbiepig/MineXLauncher.git
synced 2025-06-08 08:04:49 +00:00
Update build.ts
Signed-off-by: zumbiepig <121742281+zumbiepig@users.noreply.github.com>
This commit is contained in:
parent
3cbd48ed7d
commit
58607dafe5
6
build.ts
6
build.ts
@ -29,7 +29,7 @@ function getFiles(baseDir: string, dir?: string, filesArr?: string[]) {
|
|||||||
|
|
||||||
const isDev = process.env.NODE_ENV === 'development' ? true : false;
|
const isDev = process.env.NODE_ENV === 'development' ? true : false;
|
||||||
const srcDir = resolve(import.meta.dir, 'src');
|
const srcDir = resolve(import.meta.dir, 'src');
|
||||||
const publicDir = resolve(import.meta.dir, 'public');
|
const publicDir = resolve(import.meta.dir, process.env['BUILD_PATH'] ?? 'public');
|
||||||
const srcFiles = getFiles(resolve(import.meta.dir, 'src'));
|
const srcFiles = getFiles(resolve(import.meta.dir, 'src'));
|
||||||
const bundleFiles: string[] = [];
|
const bundleFiles: string[] = [];
|
||||||
const minifyFiles: string[] = [];
|
const minifyFiles: string[] = [];
|
||||||
@ -48,10 +48,10 @@ srcFiles.forEach((file) => {
|
|||||||
} else copyFiles.push(file);
|
} else copyFiles.push(file);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isDev) {
|
/* if (!isDev) {
|
||||||
console.log(chalk.cyan('Removing old build artifacts...\n'));
|
console.log(chalk.cyan('Removing old build artifacts...\n'));
|
||||||
rmSync(publicDir, { force: true, recursive: true });
|
rmSync(publicDir, { force: true, recursive: true });
|
||||||
}
|
} */
|
||||||
|
|
||||||
console.log(chalk.cyan('Bundling TypeScript and modules...\n'));
|
console.log(chalk.cyan('Bundling TypeScript and modules...\n'));
|
||||||
await build({
|
await build({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user