dbgate/packages/web/build-index.js

9 lines
299 B
JavaScript
Raw Permalink Normal View History

2024-09-03 10:57:52 +00:00
const fs = require('fs');
const template = fs.readFileSync('./index.html.tpl', 'utf-8');
for (const page of ['', 'not-logged', 'error', 'admin-login', 'login', 'admin', 'license']) {
const text = template.replace(/{{page}}/g, page);
fs.writeFileSync(`public/${page || 'index'}.html`, text);
}