-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 1.1 KB
/
Makefile
File metadata and controls
40 lines (32 loc) · 1.1 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
# === Makefile Helper ===
# Styles
YELLOW=$(shell echo "\033[00;33m")
RED=$(shell echo "\033[00;31m")
RESTORE=$(shell echo "\033[0m")
BUN=bun
.DEFAULT_GOAL := list
.PHONY: list
list:
@echo "******************************"
@echo "${YELLOW}Available targets${RESTORE}:"
@grep -E '^[a-zA-Z-]+:.*?## .*$$' Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " ${YELLOW}%-15s${RESTORE} > %s\n", $$1, $$2}'
@echo "${RED}==============================${RESTORE}"
.PHONY: codeclean
codeclean: ## Code Clean
@$(BUN) prettier --write .
.PHONY: run
run: ## Run ARGS=""
@LOG_LEVELS=info,debug $(BUN) src/index.ts $$ARGS
.PHONY: staging-run
staging-run: ## Run ARGS=""
@CRYSTALLIZE_ENVIRONMENT=staging LOG_LEVELS=info,debug $(BUN) src/index.ts $$ARGS
.PHONY: build
build: ## Build CLI
@$(BUN) build --compile --minify src/index --outfile crystallize
@rm -f .*.bun-build
.PHONY: build-all
build-all:
for target in bun-linux-x64 bun-linux-arm64 bun-windows-x64 bun-darwin-x64 bun-darwin-arm64; do \
$(BUN) build --compile --minify src/index --outfile crystallize-$$target --target=$$target; \
done
@rm -f ./.*.bun-build