forked from MapComplete/MapComplete
Use variable instead of repeated strings for path.
This commit is contained in:
parent
344abbea85
commit
a72d0b2abe
1 changed files with 2 additions and 2 deletions
|
@ -247,7 +247,7 @@ let wikiPage = "{|class=\"wikitable sortable\"\n" +
|
||||||
|
|
||||||
const generatedDir = "./assets/generated";
|
const generatedDir = "./assets/generated";
|
||||||
if (! existsSync(generatedDir)) {
|
if (! existsSync(generatedDir)) {
|
||||||
mkdirSync("./assets/generated")
|
mkdirSync(generatedDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const layoutName in all) {
|
for (const layoutName in all) {
|
||||||
|
@ -275,7 +275,7 @@ for (const layoutName in all) {
|
||||||
|
|
||||||
wikiPage += "|}"
|
wikiPage += "|}"
|
||||||
|
|
||||||
writeFile("./assets/generated/wikiIndex", wikiPage, (err) => {
|
writeFile(generatedDir + "/wikiIndex", wikiPage, (err) => {
|
||||||
if (err !== null) {
|
if (err !== null) {
|
||||||
console.log("Could not save wikiindex", err);
|
console.log("Could not save wikiindex", err);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue