forked from plaid/react-plaid-link
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (37 loc) · 1.21 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
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 --config '.eslintrc.js' --ignore-pattern '!.eslintrc.js'
NPM_ENV_VARS = npm_config_registry=https://registry.npmjs.org
NPM = $(NPM_ENV_VARS) npm
XYZ = $(NPM_ENV_VARS) node_modules/.bin/xyz --repo git@github.com:pbernasconi/react-plaid-link.git
TEST_FILES = $(shell find test -name '*.js' | sort)
SRC_FILES = $(shell find src -name '*.js' | sort)
compile:
@echo "[Compiling source]"
$(BABEL) src --out-dir lib
.PHONY: build
build: compile
@mkdir -p dist
@./node_modules/.bin/webpack --config webpack.dist.config.js
.PHONY: clean
clean:
@rm -rf dist lib
.PHONY: lint
lint:
@$(ESLINT) -- $(SRC_FILES) $(TEST_FILES) .eslintrc.js
.PHONY: lint-fix
lint-fix:
@$(ESLINT) --fix -- $(SRC_FILES) $(TEST_FILES) .eslintrc.js
.PHONY: setup
setup:
@$(NPM) install
.PHONY: start
start:
@$(NODE) server.js
.PHONY: test
test:
@$(MOCHA) -- test/components/PlaidLink.spec.js
.PHONY: release-major release-minor release-patch
release-major release-minor release-patch: compile build
@$(XYZ) --increment $(@:release-%=%)