basic template setup
This commit is contained in:
parent
dd3922d691
commit
a3f9651982
5 changed files with 48 additions and 6 deletions
22
build.js
Normal file
22
build.js
Normal 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();
|
||||
Loading…
Add table
Add a link
Reference in a new issue