-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
44 lines (28 loc) · 982 Bytes
/
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
.PHONY: lint fix check-types node_modules build clean
# The CI environment variable is set automatically in CircleCI and GitLab CI
CI ?= false
lint: node_modules ## Checks JS file for ESLint conformity
@echo Checking for style guide compliance
npm run lint
fix: node_modules ## Fix JS file ESLint issues
@echo Fixing lint issues to follow style guide
npm run fix
check-types: node_modules ## Checks TS file for TypeScript confirmity
@echo Checking for TypeScript compliance
npm run check-types
node_modules: package.json package-lock.json
@echo Getting dependencies using npm
ifeq ($(CI),false)
npm install
else
# This runs in CI with NODE_ENV=production which doesn't install devDependencies without this flag
npm ci --include=dev
endif
touch $@
build: node_modules ## Builds lib
@echo Building calls-common lib
npm run build
clean: ## Clears cached; deletes node_modules and dist directories
@echo Cleaning Web App
npm run clean
rm -f .eslintcache