implement template

This commit is contained in:
Pierre Dubouilh
2018-12-11 19:10:35 +01:00
parent 52188c1ae1
commit 3ff1c03d5f
3 changed files with 91 additions and 62 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ build:
embed:
echo "embedding css and js into binary"
cp src/main.go gossa.go
perl -pe 's/template_will_be_here/`cat src\/page.tmpl`/ge' -i gossa.go
perl -pe 's/css_will_be_here/`cat src\/style.css`/ge' -i gossa.go
perl -pe 's/js_will_be_here/`cat src\/script.js`/ge' -i gossa.go
perl -pe 's/favicon_will_be_here/`base64 -w0 src\/favicon.png`/ge' -i gossa.go
@@ -20,7 +21,7 @@ ci:
cd src && sleep 5 && go test
ci-watch:
ls src/* | entr -rc make ci
ls src/* | entr -rc make ci
watch:
ls src/* | entr -rc make run