update
This commit is contained in:
14
scripts/build.cjs
Normal file
14
scripts/build.cjs
Normal file
@@ -0,0 +1,14 @@
|
||||
const { execSync } = require('child_process');
|
||||
const { platform } = require('os');
|
||||
|
||||
const isWindows = platform() === 'win32';
|
||||
|
||||
if (isWindows) {
|
||||
execSync('del /s /q api\\build', { stdio: 'inherit' });
|
||||
execSync('del /s /q dist', { stdio: 'inherit' });
|
||||
} else {
|
||||
execSync('rm -rf api/build', { stdio: 'inherit' });
|
||||
execSync('rm -rf dist', { stdio: 'inherit' });
|
||||
}
|
||||
|
||||
execSync('vite build --out-dir api/build', { stdio: 'inherit' });
|
||||
Reference in New Issue
Block a user