-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
75 lines (61 loc) · 1.89 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
.PHONY: install, install-web, install-sanity, install-api, api, sanity-dev, sanity-prod, web, backed, prod, sanity-deploy, netlify-deploy, test-web, vitest, cypress, lint, cleanup
install: SHELL:=/bin/bash
install:
@echo "Installing monorepo deps..."
@pnpm install --frozen-lockfile
install-web: SHELL:=/bin/bash
install-web: install
install-web:
@echo "Installing sveltekit deps..."
@cd ./svelte-app && pnpm install --frozen-lockfile
# install sanity deps
install-sanity: SHELL:=/bin/bash
install-sanity: install
install-sanity:
@echo "Installing sanity deps..."
@cd ./sanity-cms && pnpm install --frozen-lockfile
install-api: SHELL:=/bin/bash
install-api: install
install-api:
@echo "Installing elixir deps..."
@cd ./elixir-api && make install
api: SHELL:=/bin/bash
api:
@cd ./elixir-api && make dev
sanity-%: SHELL:=/bin/bash
sanity-%:
@make install-sanity
@cd ./sanity-cms && SANITY_STUDIO_DATASET=$(if $(findstring dev,$@),dev,production) pnpm dev
web: SHELL:=/bin/bash
web: install-web
web:
@cd ./svelte-app && pnpm dev
# run dev backed
backed: SHELL:=/bin/bash
backed: install-web
backed:
@cd ./svelte-app && pnpm dev:backed
# Build svelte app for prod
prod: SHELL:=/bin/bash
prod:
@cd ./svelte-app && SVELTE_ADAPTER_ENV=netlify pnpm build
# vitest
vitest: SHELL:=/bin/bash
vitest:
@cd ./svelte-app && pnpm run test:vitest
# playwright
playwright: SHELL:=/bin/bash
playwright:
@cd ./svelte-app && pnpm run test:playwright
lint: SHELL:=/bin/bash
lint: install-web install-sanity
@cd ./svelte-app && pnpm lint
@cd ./sanity-cms && pnpm lint
format: SHELL:=/bin/bash
format: install-web install-sanity install-api lint
@cd ./svelte-app && pnpm format:json
@cd ./elixir-api && mix format
# Cleanup temp files / dirs
cleanup: SHELL:=/bin/bash
cleanup:
@rm -rf ./elixir-api/_build ./elixir-api/deps ./sanity-cms/dist ./svelte-app/.netlify ./svelte-app/.svelte-kit ./svelte-app/build ./svelte-app/dist