-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 726 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 726 Bytes
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
SHELL := /bin/bash
PROTOS_DIR := $(shell realpath ../../protos)
.PHONY: install-dependencies format format-check lint-check pre-commit-check generate test
install-dependencies:
npm install
format:
npx prettier --write "src/**/*.ts" "tests/**/*.ts" "grpc/**/*.ts"
format-check:
npx prettier --check "src/**/*.ts" "tests/**/*.ts" "grpc/**/*.ts"
lint-check: format-check
pre-commit-check: lint-check
generate:
@echo "➜ Generating TypeScript protobuf code from proto definitions"
cd $(PROTOS_DIR) && buf generate
@echo "✅ Proto generation complete."
test:
ifeq ($(REPORT),1)
JEST_JUNIT_OUTPUT_NAME=node.xml npm test -- --forceExit --reporters=default --reporters=jest-junit
else
npm test -- --forceExit
endif