Update the browser, editor, settings, and installer
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { readdir } from 'node:fs/promises';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
async function check(directory) {
|
||||
for (const item of await readdir(directory, { withFileTypes: true })) {
|
||||
const file = `${directory}/${item.name}`;
|
||||
if (item.isDirectory()) await check(file);
|
||||
else if (/\.(mjs|cjs)$/.test(file)) {
|
||||
const result = spawnSync(process.execPath, ['--check', file], { stdio: 'inherit' });
|
||||
if (result.status !== 0) process.exit(result.status || 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const directory of ['src', 'scripts', 'test']) await check(directory);
|
||||
console.log('JavaScript syntax checks passed.');
|
||||
Reference in New Issue
Block a user