-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (27 loc) · 806 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
LINT=./node_modules/.bin/jshint
LINT_FLAGS=
TEST=./node_modules/.bin/mocha
SPEC_FLAGS=-R spec
COVERAGE_FLAGS=-R mocha-text-cov
MINIFY=./node_modules/.bin/uglifyjs
MINIFY_FLAGS=-c -m --comments '/Honeyloops/'
usage:
@echo lint: lints the source
@echo spec: runs the test specs
@echo coverage: runs the code coverage test
@echo test: lint, spec and coverage threshold test
@echo build: builds the minified version
.PHONY: usage test lint
lint:
@$(LINT) $(LINT_FLAGS) honeyloops.js
spec:
@$(TEST) $(SPEC_FLAGS) test/index
coverage:
@$(TEST) $(COVERAGE_FLAGS) test/index
test:
@make lint
@make spec SPEC_FLAGS="-R dot"
@make coverage COVERAGE_FLAGS="-R travis-cov"
build: honeyloops.min.js
honeyloops.min.js: honeyloops.js
@$(MINIFY) $(MINIFY_FLAGS) -o honeyloops.min.js honeyloops.js