-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
executable file
·91 lines (66 loc) · 2.16 KB
/
Makefile
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
-include .env
API_ELM=openapi/src/Api.elm
REST_URL?=https://app.ikna.io
ELM_CODEGEN=./node_modules/.bin/elm-codegen run --debug
install:
pip install pre-commit
pre-commit install
npm install
openapi:
tools/generate-openapi.sh $(OPENAPI_LOCATION) $(REST_URL)
#--global-property=debugModels \
#--global-property=debugOperations \
dev: $(API_ELM) $(wildcard src/**)
make generated
npx elm-test-rs --watch tests/Graph/View/TestLabel.elm
#$(API_ELM): $(wildcard templates/*) $(OPENAPI_LOCATION)
#make openapi
clean:
rm -rf ./elm-stuff/
rm -rf ./dist/
rm -rf ./theme/Theme/
rm -rf ./generated/
rm -rf ./codegen/generated/
rm -rf elm.json
setem:
npx setem --output generated
cd codegen && mkdir -p codegen/generated && npx setem --output generated
serve:
npm run dev
test:
npx elm-test-rs
build:
npm run build
build-docker:
docker build . -t graphsense-dashboard
serve-docker: build-docker
docker run -it --network='host' -e REST_URL=http://localhost:9000 localhost/graphsense-dashboard:latest
format:
npx elm-format --yes src tests plugins
format-plugins:
npx elm-format --yes plugins
lint:
npx elm-review
lint-fix:
npx elm-review --fix-all
lint-ci:
npx elm-review --ignore-files src/Util/View.elm,src/View/Box.elm,src/View/Locale.elm,src/Update/Search.elm,src/Route/Graph.elm,src/Route.elm,src/View/Graph/Table.elm,src/Css/Button.elm,config/Config.elm
theme-refresh:
mkdir -p theme
$(ELM_CODEGEN) --flags='{"figma_file": "$(FIGMA_FILE_ID)", "api_key": "$(FIGMA_API_TOKEN)"}' --output theme
make theme
theme:
$(ELM_CODEGEN) --output theme --flags-from=./theme/figma.json
plugin-theme-refresh:
$(ELM_CODEGEN) --flags='{"plugin_name": "$(PLUGIN_NAME)", "figma_file": "$(FIGMA_FILE_ID)", "api_key": "$(FIGMA_API_TOKEN)"}' --output plugins/$(PLUGIN_NAME)/theme
make plugin-theme
plugin-theme:
$(ELM_CODEGEN) --output theme --flags-from=./plugins/$(PLUGIN_NAME)/theme/figma.json
gen:
rm -rf generated/*
cp elm.json.base elm.json
make setem # for codegen/generated
-node generate.js
-make theme
make setem # for theme related recordsetters
.PHONY: openapi serve test format format-plugins lint lint-fix lint-ci build build-docker serve-docker gen theme