MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / walkDirFiles

Function walkDirFiles

scripts/create-github-source-zip.js:17–30  ·  view source on GitHub ↗
(absDir, baseRel, out)

Source from the content-addressed store, hash-verified

15}
16
17function walkDirFiles(absDir, baseRel, out) {
18 if (!fs.existsSync(absDir)) return;
19 const entries = fs.readdirSync(absDir, { withFileTypes: true });
20 for (const e of entries) {
21 const name = e.name;
22 const abs = path.join(absDir, name);
23 const rel = baseRel ? `${baseRel}/${name}` : name;
24 if (e.isDirectory()) {
25 walkDirFiles(abs, rel, out);
26 } else {
27 out.push(rel);
28 }
29 }
30}
31
32function addBuildFilesFromPackageJson(set) {
33 const pkg = JSON.parse(fs.readFileSync(path.join(projectRoot, 'package.json'), 'utf8'));

Callers 2

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected