-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile
30 lines (30 loc) · 1.01 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
#!make
#----------------------------------------
# Settings
#----------------------------------------
.DEFAULT_GOAL := help
#--------------------------------------------------
# Targets
#--------------------------------------------------
install: ## Installs node dependencies
@rm -rf node_modules && npm ci
check: ## Checks code for linting/construct errors
@echo "==> Checking if files are well formatted..."
@npm run lint
@npm run detect-secrets
@echo " [✓]\n"
test: ## Runs API tests
@npm test
build: ## Empty target for uniform make interfaces because API does not neet to be build
hooks: ## Configures path to git hooks
@git config core.hooksPath .githooks
run: ## Runs the API
@npm start
.PHONY:install check run help
clean: ## Cleans up node modules files
@echo "==> Cleaning up node modules ..."
@rm -r node_modules
@echo " [✓]"
@echo ""
help: ## Shows available targets
@fgrep -h "## " $(MAKEFILE_LIST) | fgrep -v fgrep | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-13s\033[0m %s\n", $$1, $$2}'