Browse Source

Added coverall.io integration

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
0f1110ff7f
  1. 2
      .travis.yml
  2. 12
      Makefile
  3. 3
      package.json

2
.travis.yml

@ -1,4 +1,4 @@
language: node_js language: node_js
node_js: node_js:
- '0.10' - '0.10'
script: make test script: make test-ci

12
Makefile

@ -18,20 +18,21 @@ demo: lint
stylus -u autoprefixer-stylus demo/assets/index.styl stylus -u autoprefixer-stylus demo/assets/index.styl
rm -rf demo/sample.json rm -rf demo/sample.json
lint: lint:
eslint ./ eslint ./
test: lint test: lint
NODE_ENV=test mocha -R spec NODE_ENV=test mocha -R spec
echo "CommonMark stat:\n" echo "CommonMark stat:\n"
./support/specsplit.js test/fixtures/commonmark/spec.txt ./support/specsplit.js test/fixtures/commonmark/spec.txt
cover: coverage:
rm -rf cover rm -rf coverage
istanbul cover node_modules/.bin/_mocha istanbul cover node_modules/.bin/_mocha
test-ci: lint
istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
gh-pages: gh-pages:
if [ "git branch --list gh-pages" ]; then \ if [ "git branch --list gh-pages" ]; then \
git branch -D gh-pages ; \ git branch -D gh-pages ; \
@ -39,7 +40,6 @@ gh-pages:
git branch gh-pages git branch gh-pages
git push origin gh-pages -f git push origin gh-pages -f
publish: publish:
@if test 0 -ne `git status --porcelain | wc -l` ; then \ @if test 0 -ne `git status --porcelain | wc -l` ; then \
echo "Unclean working tree. Commit or stash changes first." >&2 ; \ echo "Unclean working tree. Commit or stash changes first." >&2 ; \
@ -56,7 +56,6 @@ publish:
git tag ${NPM_VERSION} && git push origin ${NPM_VERSION} git tag ${NPM_VERSION} && git push origin ${NPM_VERSION}
npm publish ${GITHUB_PROJ}/tarball/${NPM_VERSION} npm publish ${GITHUB_PROJ}/tarball/${NPM_VERSION}
browserify: browserify:
rm -rf ./dist rm -rf ./dist
mkdir dist mkdir dist
@ -69,7 +68,6 @@ browserify:
--preamble "/*! ${NPM_PACKAGE} ${NPM_VERSION} ${GITHUB_PROJ} @license MIT */" \ --preamble "/*! ${NPM_PACKAGE} ${NPM_VERSION} ${GITHUB_PROJ} @license MIT */" \
> dist/remarkable.min.js > dist/remarkable.min.js
todo: todo:
grep 'TODO' -n -r ./lib 2>/dev/null || test true grep 'TODO' -n -r ./lib 2>/dev/null || test true

3
package.json

@ -20,7 +20,8 @@
"main": "index.js", "main": "index.js",
"dependencies": { "dependencies": {
"argparse": "~ 0.1.15", "argparse": "~ 0.1.15",
"autolinker": "~ 0.12.3" "autolinker": "~ 0.12.3",
"coveralls": "^2.11.2"
}, },
"devDependencies": { "devDependencies": {
"ansi": "^0.3.0", "ansi": "^0.3.0",

Loading…
Cancel
Save