-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (52 loc) · 1.59 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
ARGUMENTS = $(filter-out $@,$(MAKECMDGOALS))
default: help
# Bundle
bundle:
bun run build.js
bundle-dev:
bun build $(ARGUMENTS) --root ./src --outdir ./dist --entry-naming [dir]/[name].[ext] --watch
bundle-dev-home:
bun build ./src/pages/home/home.island.ts --root ./src --outdir ./dist --entry-naming [dir]/[name].[ext] --watch
bundle-dev-login:
bun build ./src/pages/login/login.island.tsx --root ./src --outdir ./dist --entry-naming [dir]/[name].[ext] --watch
bundle-styles:
bunx tailwindcss -i ./src/styles.css -o ./dist/styles.css --minify
# CSS
css:
bunx tailwindcss -i ./src/styles.css -o ./dist/styles.css --watch
# Help
help: echo-bun ## Show this help
@echo 'usage: make [target]'
@echo
@echo 'Targets:'
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
# Hurl
.PHONY: hurl
hurl:
hurl --verbose --continue-on-error --variables-file hurl/.env $(ARGUMENTS)
hurl-test:
hurl --test --continue-on-error --variables-file hurl/.env $(ARGUMENTS)
hurl-test-all:
hurl --test --continue-on-error --variables-file hurl/.env hurl/*.hurl
# Dependencies
dependencies: install-bun ## Initialize project
bun install
install-bun: ## Install bun
curl -fsSL https://bun.sh/install | bash
install-hurl:
cargo install hurl
# Docker
docker-build:
docker build -t query-studio .
docker-run:
docker run -it -p 3000:3000 --env-file .env query-studio
# Server
server:
bun run src/index.ts
server-dev:
bun --hot run src/index.ts
server-debug:
bun --inspect --hot run src/index.ts
# catch anything and do nothing
%:
@: