mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
CODEBASE: Update build script to avoid unnecessary newline in generated script (#2224)
This commit is contained in:
@@ -57,8 +57,14 @@ processDir(docImagesRoot);
|
||||
let autogeneratedContent = `// THIS FILE IS AUTOGENERATED. DO NOT EDIT IT MANUALLY.
|
||||
${docFiles.map((f, i) => `import file${i} from "./doc/${f}?raw";`).join("\n")}
|
||||
${nsDocFiles.map((f, i) => `import nsDoc_${f.replaceAll(".", "_")} from "../../markdown/${f}?raw";`).join("\n")}
|
||||
${docImagesFiles.map((f, i) => `import docImages_${f.replaceAll(".", "_")} from "./images/${f}";`).join("\n")}
|
||||
|
||||
`;
|
||||
if (docImagesFiles.length > 0) {
|
||||
autogeneratedContent += `${docImagesFiles
|
||||
.map((f) => `import docImages_${f.replaceAll(".", "_")} from "./images/${f}";`)
|
||||
.join("\n")}
|
||||
`;
|
||||
}
|
||||
autogeneratedContent += `
|
||||
export const AllPages: Record<string, string> = {};
|
||||
${docFiles.map((f, i) => `AllPages["${f}"] = file${i};`).join("\n")}
|
||||
${nsDocFiles.map((f, i) => `AllPages["nsDoc/${f}"] = nsDoc_${f.replaceAll(".", "_")};`).join("\n")}
|
||||
|
||||
Reference in New Issue
Block a user