-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 1.44 KB
/
Makefile
File metadata and controls
50 lines (40 loc) · 1.44 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
49
50
.PHONY: install, install-web, install-sanity, sanity-dev, sanity-prod, web, prod, sanity-deploy, netlify-deploy, test-web, vitest, 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: SHELL:=/bin/bash
install-sanity: install
install-sanity:
@echo "Installing sanity deps..."
@cd ./sanity-cms && pnpm install --frozen-lockfile
sanity-%: SHELL:=/bin/bash
sanity-%:
@make install-sanity
@cd ./sanity-cms && SANITY_STUDIO_DATASET=$(if $(findstring dev,$@),dev,production) pnpm dev
typegen: SHELL:=/bin/bash
typegen: install-web install-sanity
@cd ./sanity-cms && pnpm sanity schema extract --enforce-required-fields
@cd ./sanity-cms && pnpm sanity typegen generate
web: SHELL:=/bin/bash
web: install-web
web:
@cd ./svelte-app && pnpm dev
prod: SHELL:=/bin/bash
prod:
@cd ./svelte-app && SVELTE_ADAPTER_ENV=netlify pnpm build
lint: SHELL:=/bin/bash
lint: install-web install-sanity
@cd ./svelte-app && pnpm lint
@cd ./sanity-cms && pnpm lint && pnpm validate
format: SHELL:=/bin/bash
format: install-web install-sanity install-api lint
@cd ./svelte-app && pnpm format:json
cleanup: SHELL:=/bin/bash
cleanup:
@rm -rf ./sanity-cms/dist ./svelte-app/.netlify ./svelte-app/.svelte-kit ./svelte-app/build ./svelte-app/dist