basic template setup

This commit is contained in:
Jordan Scales 2020-04-21 12:37:59 -04:00
parent dd3922d691
commit a3f9651982
5 changed files with 48 additions and 6 deletions

22
build.js Normal file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env node
const ejs = require("ejs");
const fs = require("fs");
let id = 0;
function getNewId() {
return ++id;
}
function getCurrentId() {
return id;
}
function buildDocs() {
const template = fs.readFileSync("./docs/index.html.ejs", "utf-8");
fs.writeFileSync(
"./docs/index.html",
ejs.render(template, { getNewId, getCurrentId })
);
}
buildDocs();