-
Notifications
You must be signed in to change notification settings - Fork 151
/
Makefile
82 lines (59 loc) · 1.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
NODE = node --harmony
BABEL = ./node_modules/.bin/babel
MOCHA = node --harmony node_modules/.bin/mocha --reporter spec --require test/setup.js --compilers js:babel-core/register
ESLINT = node_modules/.bin/eslint
JEST = node_modules/.bin/jest
ROLLUP = node_modules/.bin/rollup
PRETTIER = node_modules/.bin/prettier
STORYBOOK_TO_PAGES = node_modules/.bin/storybook-to-ghpages
NPM_ENV_VARS = npm_config_registry=https://registry.npmjs.org
NPM = $(NPM_ENV_VARS) npm
XYZ = $(NPM_ENV_VARS) node_modules/.bin/xyz --repo [email protected]:plaid/react-plaid-link.git
STORYBOOK = node_modules/.bin/start-storybook
RELEASE_BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
SRC_FILES = $(shell find src -name '*.js|*.tsx|*.ts' | sort)
.PHONY: clean
clean:
@rm -rf dist lib
.PHONY: build
build: clean
yarn patch-package
@$(ROLLUP) -c
.PHONY: check-import
check-import:
./scripts/check-import
.PHONY: lint
lint:
@$(ESLINT) '{src,examples}/**/*.{ts,tsx,js,jsx}'
.PHONY: test
test: export NODE_ENV=test
test: export BABEL_ENV=testing
test:
@$(JEST)
.PHONY: test-watch
test-watch: export NODE_ENV=test
test-watch: export BABEL_ENV=testing
test-watch:
@$(JEST) --watch
.PHONY: lint-fix
lint-fix:
@$(ESLINT) --fix '{src,examples}/**/*.{ts,tsx,js,jsx}'
.PHONY: setup
setup:
yarn
yarn patch-package
# .PHONY: test
# test:
# @$(MOCHA) -- test/components/PlaidLink.spec.js
.PHONY: prettier
prettier:
@$(PRETTIER) './**/*.js' './**/*.css' --write
.PHONY: storybook
storybook:
@$(STORYBOOK) -p 6006
.PHONY: storybook-deploy
storybook-deploy:
$(STORYBOOK_TO_PAGES)
.PHONY: release-major release-minor release-patch release-premajor release-preminor release-prepatch release-prerelease
release-major release-minor release-patch release-premajor release-preminor release-prepatch release-prerelease: build
@$(XYZ) --increment $(@:release-%=%) --branch $(RELEASE_BRANCH) --prerelease-label beta