Build docs into dist folder
This commit is contained in:
parent
29b0ef06eb
commit
3ce2395594
1 changed files with 3 additions and 3 deletions
|
|
@ -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 })
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue