@@ -2,27 +2,32 @@ NODE=$(shell which node)
22NPM =$(shell which npm)
33YARN =$(shell which yarn)
44JQ =$(shell which jq)
5+ COVERALLS =./node_modules/coveralls/bin/coveralls.js
56
67REMOTE ="git@github.com:reactjs/react-modal"
78
89VERSION =$(shell jq ".version" package.json)
910
11+ COVERAGE? =true
12+
1013help : info
1114 @echo
1215 @echo " Current version: $( VERSION) "
1316 @echo
1417 @echo " List of commands:"
1518 @echo
16- @echo " make info - display node, npm and yarn versions..."
17- @echo " make deps - install all dependencies."
18- @echo " make serve - start the server."
19- @echo " make tests - run tests."
20- @echo " make lint - run lint."
21- @echo " make docs - build and serve the docs."
22- @echo " make build - build project artifacts."
23- @echo " make publish - build and publish version on npm."
24- @echo " make publish-docs - build the docs and publish to gh-pages."
25- @echo " make publish-all - publish version and docs."
19+ @echo " make info - display node, npm and yarn versions..."
20+ @echo " make deps - install all dependencies."
21+ @echo " make serve - start the server."
22+ @echo " make tests - run tests."
23+ @echo " make tests-single-run - run tests (used by continuous integration)."
24+ @echo " make coveralls - show coveralls."
25+ @echo " make lint - run lint."
26+ @echo " make docs - build and serve the docs."
27+ @echo " make build - build project artifacts."
28+ @echo " make publish - build and publish version on npm."
29+ @echo " make publish-docs - build the docs and publish to gh-pages."
30+ @echo " make publish-all - publish version and docs."
2631
2732info :
2833 @echo node version: ` $( NODE) --version` " ($( NODE) )"
@@ -46,9 +51,15 @@ serve:
4651tests :
4752 @npm run test
4853
49- tests-ci :
54+ tests-single-run :
5055 @npm run test -- --single-run
5156
57+ coveralls :
58+ -cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js 2> /dev/null
59+
60+ tests-ci : clean lint
61+ @COVERAGE=$(COVERAGE ) make tests-single-run coveralls
62+
5263lint :
5364 @npm run lint
5465
@@ -91,9 +102,6 @@ publish-version: release-commit release-tag
91102
92103publish-finished : clean
93104
94- clean :
95- @rm -rf .version .branch
96-
97105pre-publish : clean .branch .version deps-project tests-ci build
98106
99107publish : pre-publish publish-version publish-finished
@@ -111,3 +119,6 @@ publish-docs: deps-docs build-docs
111119 cd ..
112120
113121publish-all : publish publish-docs
122+
123+ clean :
124+ @rm -rf .version .branch ./coverage/*
0 commit comments