mirror of
https://github.com/Kornstalx/5etools-mirror-2.github.io.git
synced 2025-10-28 20:45:35 -05:00
v1.208.0
This commit is contained in:
20
test/test-page-generator.js
Normal file
20
test/test-page-generator.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import fs from "fs";
|
||||
import "../js/parser.js";
|
||||
import "../js/utils.js";
|
||||
import {PAGE_GENERATORS} from "../node/generate-pages/generate-pages-page-generator-config.js";
|
||||
|
||||
function main () {
|
||||
const htmlFiles = new Set(
|
||||
fs.readdirSync(".")
|
||||
.filter(fname => fname.endsWith(".html")),
|
||||
);
|
||||
|
||||
PAGE_GENERATORS
|
||||
.forEach(generator => htmlFiles.delete(generator.getPage()));
|
||||
|
||||
if (!htmlFiles.size) return console.log(`All pages have generators!`);
|
||||
|
||||
console.warn(`Pages did not have generators:\n${Array.from(htmlFiles).sort(SortUtil.ascSortLower).map(it => `\t${it}`).join("\n")}`);
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user