-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (40 loc) · 1.2 KB
/
Makefile
File metadata and controls
48 lines (40 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
run-dev:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up elm
.PHONY: run-dev
elm: runtime-dependencies
npm install elm@latest-0.19.1
node scripts/replace_with_env_vars.js
which elm-live || npm install -g elm-live@^3.4.1
make elm-live-create
.PHONY: elm
elm-live-create:
elm-live src/Main.elm \
--dir=public \
--pushstate \
--host=${ELM_HOST} \
--port=${ELM_PORT} \
--start-page=index.html \
-- --output public/client.js
.PHONY: elm-live-create
infra-dependencies:
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up graphql-engine graphql-console
runtime-dependencies: node_modules build-graphql
.PHONY: runtime-dependencies
node_modules: package.json
npm install
.PHONY: node_modules
build-graphql:
rm -f src/Db/*.elm
which gq || npm install -g graphqurl
gq ${HASURA_GRAPHQL_ENDPOINT} -H "X-Hasura-Admin-Secret: ${HASURA_ADMIN_SECRET}" --introspect > schema.graphql
node scripts/run-graphql-to-elm.js
.PHONY: build-graphql
clean-graphql:
rm -rf src/GraphQL src/db/*.elm build/db
.PHONY: clean-graphql
build-app:
npm install elm@latest-0.19.1
make build-graphql
elm make src/Main.elm --output public/client.js
node scripts/replace_with_env_vars.js
.PHONY: build-app