mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
68840fc85c
- Split browser.ts (700 lines) into src/browser/ module (page, mcp, errors, discover, tabs, index) - Add unified error handling: CliError base class + logger module - Enable TypeScript strict mode, fix 12 type errors - Extract inline build scripts to scripts/clean-yaml.cjs and copy-yaml.cjs - All 178 unit tests pass, build produces 83 entries across 19 sites
20 lines
437 B
JavaScript
20 lines
437 B
JavaScript
/**
|
|
* Clean YAML files from dist/clis/ before copying fresh ones.
|
|
*/
|
|
const { readdirSync, rmSync, existsSync, statSync } = require('fs');
|
|
const path = require('path');
|
|
|
|
function walk(dir) {
|
|
if (!existsSync(dir)) return;
|
|
for (const f of readdirSync(dir)) {
|
|
const fp = path.join(dir, f);
|
|
if (statSync(fp).isDirectory()) {
|
|
walk(fp);
|
|
} else if (/\.ya?ml$/.test(f)) {
|
|
rmSync(fp);
|
|
}
|
|
}
|
|
}
|
|
|
|
walk('dist/clis');
|