mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-09-20 18:59:17 +08:00
Move to using vue-cli-service instead of parcel (2.1MB to 850KB)
This commit is contained in:
14
src/nginxconfig/build/template.js
Normal file
14
src/nginxconfig/build/template.js
Normal file
@@ -0,0 +1,14 @@
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
// Fetch the posthtml template and convert it to an ejs template
|
||||
const main = () => {
|
||||
const buildDir = path.join(__dirname, '..', '..', '..', 'build');
|
||||
let template = fs.readFileSync(path.join(buildDir, 'base.html'), 'utf8');
|
||||
template = template.replace('<block name="title"></block>', 'NGINXConfig | ');
|
||||
template = template.replace('<block name="head"></block>', '');
|
||||
template = template.replace('<block name="content"></block>', '<div id="app"></div>');
|
||||
fs.writeFileSync(path.join(buildDir, 'index.html'), template);
|
||||
};
|
||||
|
||||
main();
|
Reference in New Issue
Block a user