-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
49 lines (35 loc) · 769 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
45
46
47
48
49
PATH := ./node_modules/.bin:$(PATH)
TESTS = $(shell find ./src -name '*-test.js')
SRC = $(shell find ./src -name '*.js')
LIB = $(SRC:./src/%.js=./lib/%.js)
build: $(LIB)
clean:
@rm -rf ./lib
install link::
@npm $@
test::
@mochify $(TESTS);
ci::
@mochify --watch $(TESTS);
lint::
@eslint-jsx src;
docs::
@$(MAKE) --no-print-directory -C docs/ html
docs-publish::
@$(MAKE) --no-print-directory -C docs/ publish
release-patch: test lint
@$(call release,patch)
release-minor: test lint
@$(call release,minor)
release-major: test lint
@$(call release,major)
publish:
@git push --tags origin HEAD:master
@npm publish
@$(MAKE) docs-publish
define release
npm version $(1)
endef
./lib/%.js: ./src/%.js
@mkdir -p $(@D)
@cat $< | jsx --harmony > $@