forked from ramda/ramda
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (36 loc) · 1022 Bytes
/
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
DEEDPOLL = node_modules/.bin/deedpoll \
--rename arr:list \
--rename array:list \
--rename ctor:Ctor \
--rename fnArity:length \
--rename i:idx \
--rename index:idx
UGLIFY = node_modules/.bin/uglifyjs
XYZ = node_modules/.bin/xyz --repo git@github.com:ramda/ramda.git --script scripts/prepublish
SRC = $(shell find src -name '*.js')
dist/ramda.js: scripts/build scripts/header template.js $(SRC)
git checkout -- '$@'
scripts/header >ramda.js.tmp
'$<' --complete >>ramda.js.tmp
mv ramda.js.tmp '$@'
dist/ramda.min.js: dist/ramda.js scripts/header
scripts/header >'$@'
$(UGLIFY) --compress --mangle <'$<' >>'$@'
.PHONY: clean
clean:
rm -f -- dist/ramda.js dist/ramda.min.js ramda.js.tmp
.PHONY: lint
lint:
@$(DEEDPOLL) -- $(SRC)
rm dist/ramda.js
make dist/ramda.js
git diff --exit-code
.PHONY: release-major release-minor release-patch
release-major release-minor release-patch:
@$(XYZ) --increment $(@:release-%=%)
.PHONY: setup
setup:
npm install
.PHONY: test
test: dist/ramda.js
npm test