forked from Cederman/react-native-swipeable
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 597 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 597 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
BIN = ./node_modules/.bin
SRC = $(shell find ./src -name '*.js')
LIB = $(SRC:./src/%=lib/%)
EXAMPLE = $(shell find ./example/*.js)
build:: $(LIB)
lint::
@$(BIN)/eslint $(SRC) $(EXAMPLE)
release-patch: build lint
@$(call release,patch)
release-minor: build lint
@$(call release,minor)
release-major: build lint
@$(call release,major)
publish:
git push --tags origin HEAD:master
npm publish
lib/%.js: src/%.js
@echo "building $@"
@mkdir -p $(@D)
@$(BIN)/babel --presets=latest,react,stage-0 --source-maps-inline -o $@ $<
clean:
@rm -rf lib/
define release
npm version $(1)
endef