-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 762 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 762 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
31
32
33
34
35
36
37
38
39
40
41
42
43
BIN = ./node_modules/.bin
PATH := $(BIN):$(PATH)
LIB = $(shell find lib -name "*.js")
DIST = $(patsubst lib/%.js,dist/%.js,$(LIB))
install:
@ npm $@
dist: $(DIST)
dist/%.js: lib/%.js
@ mkdir -p $(@D)
$(BIN)/babel $< -o $@
lint:
@ echo "\nLinting source files, hang on..."
@ yarn lint
test:
@ echo "\nTesting source files, hang on..."
@ yarn test
test-dist:
@ echo "\nTesting build files, almost there..!"
@ yarn test:dist
coveralls:
@ cat ./coverage/lcov.info | $(BIN)/coveralls
clean:
@ rm -rf ./dist
@ rm -rf ./coverage
build: lint test clean dist test-dist
@ git add . && \
git commit -am "make build"
release: build
@ npm publish
release-patch: build
@ npm version patch
.PHONY: install dev test clean dist test-build build