elegance-js 2.0.10 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/page_compiler.mjs +4 -0
- package/package.json +1 -1
package/dist/page_compiler.mjs
CHANGED
|
@@ -549,6 +549,10 @@ var pageToHTML = async (pageLocation, pageElements, metadata, DIST_DIR2, pageNam
|
|
|
549
549
|
const resultHTML = `${headHTML}${bodyHTML}`;
|
|
550
550
|
const htmlLocation = path.join(pageLocation, (pageName === "page" ? "index" : pageName) + ".html");
|
|
551
551
|
if (doWrite) {
|
|
552
|
+
const dirname = path.dirname(htmlLocation);
|
|
553
|
+
if (fs.existsSync(dirname) === false) {
|
|
554
|
+
fs.mkdirSync(dirname, { recursive: true });
|
|
555
|
+
}
|
|
552
556
|
fs.writeFileSync(
|
|
553
557
|
htmlLocation,
|
|
554
558
|
resultHTML,
|