-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (42 loc) · 1.2 KB
/
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
50
51
52
53
54
55
56
57
BIN = ./node_modules/.bin
TESTS = $(shell find ./src -path '**/__tests__/*-test.js')
SRC = $(shell find ./src -name '*.js' -not -path '*/__tests__/*')
LIB = $(SRC:./src/%=./lib/%)
NODE = $(BIN)/babel-node $(BABEL_OPTIONS)
MOCHA_OPTIONS = -R dot
MOCHA = $(BIN)/_mocha $(MOCHA_OPTIONS)
NYC_OPTIONS = --all --require babel-core/register
NYC = $(BIN)/nyc $(NYC_OPTIONS)
build::
@$(MAKE) -j 8 $(LIB)
doctoc:
@$(BIN)/doctoc --title '**Table of Contents**' ./README.md
changelog:
@$(BIN)/conventional-changelog -p angular -i CHANGELOG.md -s -r 0
lint::
@$(BIN)/eslint $(SRC)
storybook::
@npm run storybook
check::
@$(BIN)/flow
test::
@$(BIN)/jest
test-cov::
@$(BIN)/jest --coverage
type::
@$(BIN)/flow
type-cov::
@$(BIN)/flow-coverage-report -i 'src/**/*.js' -x 'src/**/*-test.js' -f $(BIN)/flow
ci::
@$(BIN)/jest --watch
version-major version-minor version-patch: build check lint test
@npm version $(@:version-%=%)
publish: build check lint test
@git push --tags origin HEAD:master
@npm publish --access public
clean:
@rm -rf lib/
./lib/%.js: ./src/%.js
@echo "Building $<"
@mkdir -p $(@D)
@$(BIN)/babel $(BABEL_OPTIONS) -o $@ $<