-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
55 lines (43 loc) · 1.2 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
BABEL ?= ./node_modules/.bin/babel
BABEL-NODE ?= ./node_modules/.bin/babel-node
BROWSER-RUN ?= ./node_modules/.bin/browser-run
BROWSERIFY ?= ./node_modules/.bin/browserify
DOCCO ?= ./node_modules/docco/bin/docco
ESLINT ?= ./node_modules/.bin/eslint
FAUCET ?= ./node_modules/.bin/faucet
HTTPSERVE ?= ./node_modules/.bin/http-server
SED ?= sed
all: node_modules
FORCE:
node_modules: package.json package-lock.json
npm install
.PHONY: browser-check
browser-check: node_modules
$(BROWSERIFY) -t babelify tests/tests.js | $(BROWSER-RUN) -p 8022
.PHONY: serve
serve: node_modules
$(HTTPSERVE) -p 8080
.PHONY: clean
clean:
-rm -rf node_modules
.PHONY: docs
docs:
$(DOCCO) --css=stylesheets/docco.css src/pluggable.js
.PHONY: watchjs
watchjs: node_modules
$(BABEL) --out-file=./dist/pluggable.js --watch=src/pluggable.js
.PHONY: dist
dist: node_modules
npm run build
.PHONY: check
check: dist
$(BABEL-NODE) tests/tests.js | $(FAUCET)
.PHONY: release
release:
$(SED) -ri s/\"version\":\ \"[0-9]\+\.[0-9]\+\.[0-9]\+\"/\"version\":\ \"$(VERSION)\"/ package.json
$(SED) -i "s/(Unreleased)/(`date +%Y-%m-%d`)/" CHANGES.md
make docs
make dist
.PHONY: eslint
eslint: node_modules
$(ESLINT) src/*.js