mirror of
https://github.com/hrfee/jfa-go.git
synced 2024-12-22 09:00:10 +00:00
site: allow html injection
This commit is contained in:
parent
51b59ae103
commit
7ff492df6c
@ -9,6 +9,7 @@ all:
|
|||||||
cd out && npx uncss index.html --stylesheets remixicon.css > _remixicon.css; cd ..
|
cd out && npx uncss index.html --stylesheets remixicon.css > _remixicon.css; cd ..
|
||||||
mv out/_remixicon.css out/remixicon.css
|
mv out/_remixicon.css out/remixicon.css
|
||||||
cp ../static/* out/
|
cp ../static/* out/
|
||||||
|
node inject.js
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
-mkdir -p out
|
-mkdir -p out
|
||||||
|
5
site/inject.js
Normal file
5
site/inject.js
Normal 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));
|
Loading…
Reference in New Issue
Block a user