aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoris2017-09-24 22:14:48 +0200
committerJoris2017-11-07 09:33:01 +0100
commit898e7ed11ab0958fcdaf65b99b33f7b04787630a (patch)
tree8b5ab951c36d7d27550a7c4eaad16bbd2cd0edb1 /Makefile
parent14bdbc8c937f5d0b35c61350dba28cb41c3737cd (diff)
downloadbudget-898e7ed11ab0958fcdaf65b99b33f7b04787630a.tar.gz
budget-898e7ed11ab0958fcdaf65b99b33f7b04787630a.tar.bz2
budget-898e7ed11ab0958fcdaf65b99b33f7b04787630a.zip
Bootstrap with GHCJS and reflex:
- setup login and logout, - first draft of payment view.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index a0458f1..5d695f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
start:
- @nix-shell --command "mux local"
+ @nix-shell --command "tmuxinator local"
stop:
@tmux kill-session -t sharedCost
@@ -15,31 +15,36 @@ build: build-server build-client
# ------
clean-server:
- @stack clean > /dev/null
+ @cabal clean
install-server:
- @stack setup
+ @cabal2nix --shell . > sharedCost.nix
build-server:
- @stack build || :
+ @nix-shell sharedCost.nix --command "cabal build"
launch-server:
- @(killall sharedCost || :) && stack exec sharedCost
+ @killall sharedCost || :
+ @cabal run sharedCost
watch-server:
- @nodemon -e hs,conf --exec 'clear && make build-server --silent && make launch-server'
+ @nodemon --watch src/server -e hs,conf --exec '(clear && make build-server && make launch-server) || :'
# Client
# ------
clean-client:
- @rm -r elm-stuff >/dev/null 2>&1 || true
+ @rm -rf reflex-platform
install-client:
- @elm package install --yes
+ @git clone https://github.com/reflex-frp/reflex-platform 2>/dev/null || :
+ @cd reflex-platform && ./try-reflex --command exit >/dev/null
+
+build-client-inside:
+ @cd src/client && ghcjs -Wall -Werror --make Main && mv Main.jsexe/all.js ../../public/javascript/main.js
build-client:
- @elm make src/client/Main.elm --output public/javascripts/client.js || true
+ @./reflex-platform/try-reflex --command "make build-client-inside"
watch-client:
- @nodemon -e elm --exec 'clear && make build-client --silent'
+ @./reflex-platform/try-reflex --command "nodemon --watch src/client -e hs --exec '(clear && make build-client-inside) || true'"