forked from es-analysis/plato-as-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 860 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
BIN = ./node_modules/.bin
MOCHA = $(BIN)/mocha
ISTANBUL = $(BIN)/istanbul
JSHINT = $(BIN)/jshint
JSCS = $(BIN)/jscs
COVERALLS = $(BIN)/coveralls
.PHONY: test
test:
$(MOCHA) -u bdd -R spec --recursive
.PHONY: validate
validate: lint test
.PHONY: clean
clean:
-rm -rf lib-cov
-rm -rf html-report
.PHONY: lib-cov
lib-cov: clean
$(ISTANBUL) instrument --output lib-cov --no-compact --variable global.__coverage__ lib
.PHONY: coverage
coverage: lib-cov
PLATO_AS_SERVICE_COVERAGE=1 $(MOCHA) --reporter mocha-istanbul
@echo
@echo Open html-report/index.html file in your browser
.PHONY: coveralls
coveralls: lib-cov
@PLATO_AS_SERVICE_COVERAGE=1 ISTANBUL_REPORTERS=lcovonly $(MOCHA) --reporter mocha-istanbul
@cat lcov.info | $(COVERALLS)
@rm -rf lib-cov lcov.info
.PHONY: travis
travis: validate coveralls
.PHONY: lint
lint:
$(JSHINT) .
$(JSCS) .