forked from peterver/Elessar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (31 loc) · 1000 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
export SHELL := /bin/bash
export PATH := $(shell npm bin):$(PATH)
ENTRY_FILE="./lib/rangebar.js"
DEPS := $(shell node_modules/.bin/browserify --list $(ENTRY_FILE))
TEST_FILES = $(filter-out test/utils.js, $(wildcard test/*.js))
all: dist/elessar.js
min: dist/elessar.min.js
dist/%.min.js: dist/%.js
uglifyjs $< -o $@
dist/%.js: $(DEPS)
mkdir -p $(@D)
node brow.js $(ENTRY_FILE) $@
.PHONY: clean test coverage release
clean:
rm -rf dist
coverage: $(DEPS) $(TEST_FILES)
browserify -t coverify $(TEST_FILES) | testling | coverify | tap-spec
test: $(DEPS) $(TEST_FILES)
browserify $(TEST_FILES) | testling | tap-spec
tag: dist/elessar.js dist/elessar.min.js
$(eval OLD_VERSION := $(shell git describe master --abbrev=0))
$(eval VERSION := $(shell node_modules/.bin/semver $(OLD_VERSION) -i $(v)))
tin -v $(VERSION)
git commit -am $(VERSION)
release:
git pull
git push origin {develop,master}
git push --tags
git checkout `git describe master --abbrev=0`
npm publ
git checkout -