Initial
This commit is contained in:
13
scripts/ensure-build.mjs
Normal file
13
scripts/ensure-build.mjs
Normal file
@@ -0,0 +1,13 @@
|
||||
import fs from 'node:fs';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
|
||||
if (fs.existsSync('dist/index.html')) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const result = spawnSync('npm', ['run', 'build'], {
|
||||
stdio: 'inherit',
|
||||
shell: process.platform === 'win32'
|
||||
});
|
||||
|
||||
process.exit(result.status ?? 1);
|
||||
Reference in New Issue
Block a user