mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-01-19 12:14:47 +00:00
add script for finding .dts files missing their .glb
This commit is contained in:
parent
b678b0110c
commit
63b10e44e5
18
scripts/find-missing-dts.ts
Normal file
18
scripts/find-missing-dts.ts
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import fs from "node:fs/promises";
|
||||
|
||||
async function run() {
|
||||
for await (const inFile of fs.glob("docs/base/**/*.dts")) {
|
||||
const glbFile = inFile.replace(/\.dts$/, ".glb");
|
||||
try {
|
||||
await fs.stat(glbFile);
|
||||
} catch (err) {
|
||||
if (err.code === "ENOENT") {
|
||||
console.log(inFile);
|
||||
} else {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
Loading…
Reference in a new issue