完成了封面的基本布局,还需要完善文档正文
This commit is contained in:
1 parent
1918fc7a3e
commit
578109c8de
6 files changed
+486
-20
No files matched your search
@@ -4,6 +4,8 @@ import { readdir, readdirSync, readFileSync } from "node:fs";
|
||||
export class PFiles {
|
||||
cover_html: string | undefined;
|
||||
end_html: string | undefined;
|
||||
style_html: string | undefined;
|
||||
other_htmls: Array<string> = [];
|
||||
pcolumes: Array<PColume> = [];
|
||||
constructor(dir: string) {
|
||||
//const fs = require("fs");
|
||||
@@ -17,7 +19,15 @@ export class PFiles {
|
||||
case "end_page.html":
|
||||
this.end_html = readFileSync(`${dir}/end_page.html`, "utf-8");
|
||||
break;
|
||||
case "style.html":
|
||||
this.style_html = readFileSync(`${dir}/style.html`, "utf-8");
|
||||
break;
|
||||
default:
|
||||
if (file.endsWith(".html")) {
|
||||
this.other_htmls.push(readFileSync(`${dir}/${file}`, "utf-8"));
|
||||
break;
|
||||
}
|
||||
|
||||
const meta = new PFileMetadata(file);
|
||||
const path = `${dir}/${file}`;
|
||||
const content = readFileSync(path, "utf-8");
|
||||
|
||||
Reference in new issue
Block a user