aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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'"