-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (30 loc) · 1.03 KB
/
Makefile
File metadata and controls
42 lines (30 loc) · 1.03 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
.PHONY: all lint dev build
ENGINE=npm
help: ## Show this help
@printf "Usage:\033[36m make [target]\033[0m\n"
@grep -E '^[a-zA-Z_%_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help
lint: ## Lint all files
$(ENGINE) run lint
install: ## Install everything to run/build
$(ENGINE) install
dev: ## Start dev server
$(ENGINE) run dev
test: ## Run all tests
$(ENGINE) run test
outdated: ## Show 'npm outdated' packages
$(ENGINE) outdated || true
build: ## Build site
$(ENGINE) run build
update: ## Update a package: make update pkg=<package-name>
$(ENGINE) i $(pkg)@latest
$(ENGINE) install
$(ENGINE) run build
$(ENGINE) run test
iv: ## Generate iv key
@openssl rand -hex 16 > public/data/iv.txt
key: ## Generate symmetric key
@openssl rand -base64 32 > symmetric_key.txt && \
SYMMETRIC_KEY=$$(cat symmetric_key.txt) && \
echo SYMMETRIC_KEY=$$SYMMETRIC_KEY > .env && \
echo 'symmetric_key.txt generated and added to .env; cp to .env.local'