-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
41 lines (31 loc) · 774 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
ESLINT := node_modules/.bin/eslint
JEST := node_modules/.bin/jest
PRETTIER := node_modules/.bin/prettier
WEBPACK := node_modules/.bin/webpack
PRETTIER_ARGS := .github src "*.{js,json,md,mjs}"
SCSS_FILES := $(shell find src -name "*.scss")
TYPESCRIPT_FILES := $(shell find src -name "*.ts")
.PHONY: build
build: dist
.PHONY: clean
clean:
rm -rf dist
.PHONY: format
format: node_modules
-$(ESLINT) --fix src
-$(PRETTIER) --write $(PRETTIER_ARGS)
.PHONY: check-format
check-format: node_modules
$(PRETTIER) --check $(PRETTIER_ARGS)
.PHONY: lint
lint: node_modules
$(ESLINT) src
.PHONY: test
test: node_modules
$(JEST)
dist: node_modules $(SCSS_FILES) $(TYPESCRIPT_FILES)
$(WEBPACK)
touch $@
node_modules: package.json package-lock.json
npm install
touch $@