1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 00:50:12 +00:00

site: allow html injection

This commit is contained in:
Harvey Tindall 2022-01-02 22:05:26 +00:00
parent 51b59ae103
commit 7ff492df6c
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,7 @@ all:
cd out && npx uncss index.html --stylesheets remixicon.css > _remixicon.css; cd ..
mv out/_remixicon.css out/remixicon.css
cp ../static/* out/
node inject.js
debug:
-mkdir -p out

5
site/inject.js Normal file
View File

@ -0,0 +1,5 @@
let fs = require('fs');
let content = fs.readFileSync("out/index.html", 'utf8');
fs.writeFileSync("out/index.html", content.replace('<script src="main.js"></script>', '<script src="main.js"></script>'+process.env.INJECT));