1
0
mirror of https://github.com/jdan/98.css.git synced 2026-05-05 06:01:22 +09:00

Build docs into dist folder

This commit is contained in:
Teo Dragovic
2020-04-25 15:07:11 +02:00
parent 29b0ef06eb
commit 3ce2395594

View File

@@ -32,14 +32,14 @@ function example(code) {
</div>`;
}
glob("dist/*", (err, files) => {
glob("docs/*", (err, files) => {
if (!err) {
files.forEach((srcFile) =>
fs.copyFileSync(srcFile, path.join("docs", path.basename(srcFile)))
fs.copyFileSync(srcFile, path.join("dist", path.basename(srcFile)))
);
} else throw "error globbing dist directory.";
});
fs.writeFileSync(
"docs/index.html",
path.join(__dirname, "/dist/index.html"),
ejs.render(template, { getNewId, getCurrentId, example })
);