CI Fix attempt

This commit is contained in:
Holly Stubbs 2023-07-28 09:54:32 +01:00 committed by GitHub
parent 842bcca1f4
commit 0c253b1c95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,10 +6,12 @@ import { readdirSync, statSync, readFileSync, writeFileSync } from "fs";
const tsFileData:Array<string> = new Array<string>(); const tsFileData:Array<string> = new Array<string>();
const toolinglessFolderPath = __dirname.replace("/tooling", "/");
function readDir(nam:string) { function readDir(nam:string) {
const files = readdirSync(nam); const files = readdirSync(nam);
for (const file of files) { for (const file of files) {
if (nam == "./" && (file.startsWith(".") || file == "tooling" || file == "lib" || file == "node_modules" || file == "combined.ts")) { if (nam == toolinglessFolderPath && (file.startsWith(".") || file == "tooling" || file == "lib" || file == "node_modules" || file == "combined.ts")) {
continue; continue;
} }
@ -23,7 +25,7 @@ function readDir(nam:string) {
} }
} }
readDir("./"); readDir(toolinglessFolderPath);
const combinedFiles = tsFileData.join("\n"); const combinedFiles = tsFileData.join("\n");
@ -66,5 +68,5 @@ for (const line of splitLines) {
// Investigation // Investigation
const finalOutput = resultLines.join("\n"); const finalOutput = resultLines.join("\n");
console.log(finalOutput); console.log(finalOutput);
console.log(__dirname); console.log(toolinglessFolderPath);
writeFileSync("./combined.ts", finalOutput); writeFileSync("./combined.ts", finalOutput);