MCPcopy Create free account
hub / github.com/FIND-Lab/AgentWard / transpileTsFile

Function transpileTsFile

scripts/build.mjs:17–26  ·  view source on GitHub ↗
(srcPath, destPath)

Source from the content-addressed store, hash-verified

15}
16
17function transpileTsFile(srcPath, destPath) {
18 const source = readFileSync(srcPath, "utf8");
19 const transpiled = stripTypeScriptTypes(source, {
20 mode: "transform",
21 sourceUrl: relative(rootDir, srcPath),
22 });
23 const rewritten = rewriteRelativeImports(transpiled);
24 mkdirSync(dirname(destPath), { recursive: true });
25 writeFileSync(destPath, rewritten);
26}
27
28function walkTsFiles(dirPath) {
29 for (const entry of readdirSync(dirPath)) {

Callers 2

walkTsFilesFunction · 0.85
build.mjsFile · 0.85

Calls 1

rewriteRelativeImportsFunction · 0.85

Tested by

no test coverage detected