Files
jackwener__opencli/scripts/clean-yaml.cjs
jackwener 68840fc85c refactor: P0 architecture improvements
- 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
2026-03-17 17:01:51 +08:00

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');