From 898e7ed11ab0958fcdaf65b99b33f7b04787630a Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 24 Sep 2017 22:14:48 +0200 Subject: Bootstrap with GHCJS and reflex: - setup login and logout, - first draft of payment view. --- Makefile | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'Makefile') 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'" -- cgit v1.2.3