diff options
author | Jasper Van der Jeugt | 2020-07-29 16:17:17 +0200 |
---|---|---|
committer | Jasper Van der Jeugt | 2020-07-29 16:17:17 +0200 |
commit | 780527946548c68bfcfc4d8a99abf06b66cf23c1 (patch) | |
tree | 1479ab0ceb1de8016dff7ff462cd565c452a4243 /Makefile | |
parent | 72b1de1a28c23cf694ff5f982f0f637afd4ba5bc (diff) |
Stub client
Diffstat (limited to '')
-rw-r--r-- | Makefile | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -1,12 +1,24 @@ HS_SOURCES=$(shell find server/lib/ server/src -name '*.hs') -ELM_MESSAGES_MODULE=client/src/Messages.elm +ELM_SOURCES=$(shell find client/src -name '*.elm') +ELM_MESSAGES_SOURCE=client/src/Messages.elm .PHONY: build -build: - cd server && stack build +build: server/assets/client.js server/assets/client.html server: build cd server && stack exec cafp-server -$(ELM_MESSAGES_MODULE): $(HS_SOURCES) - (cd server && stack exec cafp-generate-elm-types) >$(ELM_MESSAGES_MODULE) +.PHONY: stack_build +stack_build: $(HS_SOURCES) + (cd server && stack build) + +$(ELM_MESSAGES_SOURCE): stack_build + (cd server && stack exec cafp-generate-elm-types) >$(ELM_MESSAGES_SOURCE) + +server/assets/client.js: $(ELM_MESSAGES_SOURCE) $(ELM_SOURCES) + mkdir -p server/assets + cd client && elm make src/Client.elm --output=../server/assets/client.js + +server/assets/client.html: client/index.html + mkdir -p server/assets + cp client/index.html $@ |