You've already forked 98.css
mirror of
https://github.com/jdan/98.css.git
synced 2026-05-05 06:01:22 +09:00
23 lines
381 B
JavaScript
23 lines
381 B
JavaScript
#!/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();
|