🐞 improved version builder from template
This commit is contained in:
parent
259a76f46b
commit
09fd73b130
@ -14,7 +14,7 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.3.1-RELEASE_INFO</span>
|
||||
<span style="display: none;visibility: hidden;" id="buildinfo">RELEASE_INFO-0.4.0-RELEASE_INFO</span>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<script src="/env.js"></script>
|
||||
<script defer type="module" src="/_dist_/index.js"></script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
const fs = require('fs');
|
||||
const package = JSON.parse(fs.readFileSync(`./package.json`, { encoding: 'utf-8' }));
|
||||
const original = fs.readFileSync(`./public/index.html`, { encoding: 'utf-8' });
|
||||
const original = fs.readFileSync(`./index.template.html`, { encoding: 'utf-8' });
|
||||
let out = original.replace(/RELEASE_INFO-(\S)+-RELEASE_INFO/gi, 'RELEASE_INFO-' + package.version + '-RELEASE_INFO');
|
||||
fs.writeFileSync(`./public/index.html`, out);
|
||||
fs.writeFileSync(`./index.template.html`, out);
|
||||
|
Loading…
x
Reference in New Issue
Block a user