-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (29 loc) · 851 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
# ==============================================================================
# config
.PHONY: default build clean format install lint publish test
default: test
WATCH ?= false
# ==============================================================================
# phony targets
build:
./node_modules/.bin/babel src --ignore __tests__,__mocks__ --out-dir dist
clean:
@- rm -rf node_modules
format: | node_modules
./node_modules/.bin/standard --format src/**/*.js
install:
npm install
lint: | node_modules
./node_modules/.bin/standard src/**/*.js
publish: build
npm publish
test: | node_modules
@ if [ "$(WATCH)" = false ]; then \
./node_modules/.bin/jest; \
else \
./node_modules/.bin/jest --watch; \
fi
# ==============================================================================
# file targets
node_modules:
npm install