-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.js
29 lines (26 loc) · 907 Bytes
/
setup.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// const fs = require("fs");
// const path = require("path");
// // Recursive function to handle directory reading and processing
// function processDirectory(directory, stream) {
// fs.readdirSync(directory).forEach((file) => {
// let fullPath = path.join(directory, file);
// if (fs.lstatSync(fullPath).isDirectory()) {
// processDirectory(fullPath, stream);
// } else {
// stream.write(`\n---- File Path: ${fullPath} ----\n`);
// if (path.extname(fullPath) === ".js") {
// const data = fs.readFileSync(fullPath, "utf8");
// stream.write(data);
// }
// }
// });
// }
// // Start the process
// function listFilesToTxtFile(startPath) {
// const stream = fs.createWriteStream("setup.txt");
// stream.once("open", function (fd) {
// processDirectory(startPath, stream);
// stream.end();
// });
// }
// listFilesToTxtFile("./src");