35 lines
1 KiB
Makefile
35 lines
1 KiB
Makefile
help:
|
|
echo compile builds both ends
|
|
echo produce builds, minifies, optimises both ends
|
|
echo run produces before executing the result
|
|
echo elm builds the elm
|
|
echo haskell builds the haskell
|
|
echo format-elm formats the elm
|
|
echo produce-elm builds, minifies, optimises the elm
|
|
|
|
compile: elm haskell
|
|
|
|
produce: produce-elm haskell
|
|
echo "REMEMBER to RESTART elmskell.service TO UPDATE SITE IN PLACE"
|
|
echo "REMEMBER to RUN sudo iptables-apply -t 60 /etc/iptables/iptables.rules IF YOU HAVEN'T SINCE RESTART"
|
|
|
|
run: produce
|
|
stack exec ~/.local/bin/hs-server-exe
|
|
|
|
haskell:
|
|
cd backend && stack install
|
|
|
|
elm:
|
|
cd frontend && elm make src/Main.elm --output=../assets/js/main.js
|
|
rm -rf frontend/elm-stuff
|
|
|
|
produce-elm:
|
|
cd frontend && elm make src/Main.elm --optimize --output=tmp.js
|
|
mv frontend/tmp.js assets/js/tmp.js
|
|
rm -rf frontend/elm-stuff
|
|
rm assets/js/main.js
|
|
esbuild assets/js/tmp.js --minify --target=es5 --outfile=assets/js/main.js
|
|
rm assets/js/tmp.js
|
|
|
|
format-elm:
|
|
elm-format frontend/src/Main.elm --yes
|