Skip to content

Commit

Permalink
feature(*): add-travis-and-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
voischev committed Jul 2, 2015
1 parent 886ec1d commit a16fb8d
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -29,3 +29,4 @@ npm-debug.log
### Project

build/
coverage/
15 changes: 15 additions & 0 deletions .travis.yml
@@ -0,0 +1,15 @@
sudo: false
language: node_js
node_js:
- iojs
- "0.12"
- "0.10"

env:
global:
- ISTANBUL_COVERAGE: yes

after_success:
- npm i coveralls
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && echo "Coverage data was sent to coveralls!"

7 changes: 5 additions & 2 deletions README.md
@@ -1,4 +1,7 @@
# PostHTML
[![npm version](https://badge.fury.io/js/posthtml.svg)](http://badge.fury.io/js/posthtml)
[![Build Status](https://travis-ci.org/posthtml/posthtml.svg)](https://travis-ci.org/posthtml/posthtml)
[![Coverage Status](https://coveralls.io/repos/posthtml/posthtml/badge.svg)](https://coveralls.io/r/posthtml/posthtml)

PostHTML is a tool for transforming HTML with JS plugins. PostHTML itself is very small. It includes only a HTML parser, a HTML node tree API and a node tree stringifier.

Expand All @@ -9,8 +12,8 @@ All HTML transformations are made by plugins. And these plugins are just small p
``` javascript
var posthtml = require('posthtml'),
fs = require('fs');
var html = '<div class="wow">OMG</div>';

var html = '<div class="wow">OMG</div>';

posthtml([ require('posthtml-to-svg-tags')(), require('posthtml-extend-attrs')() ])
.process(html)
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.babel.js
Expand Up @@ -52,7 +52,7 @@ gulp.task('lint', function() {

gulp.task('test', function() {
let mocha = require('gulp-mocha');
return gulp.src('test/*.js', { read : false }).pipe(mocha());
return gulp.src('test/*.js', { read : false }).pipe(mocha({ reporter: 'spec'}));
});

// Common
Expand Down
6 changes: 4 additions & 2 deletions package.json
Expand Up @@ -40,14 +40,16 @@
"gulp-eslint": "^0.14.0",
"gulp-json-editor": "^2.2.1",
"gulp-mocha": "^2.1.2",
"isparta": "^3.0.3",
"jscs": "^1.11.2",
"jscs-protein": "https://github.com/theprotein/jscs-protein.git",
"jscs-protein": "git://github.com/theprotein/jscs-protein.git#1d22e08ca767958a95b79f3bad6449fb2fa9f496",
"mocha": "^2.2.5",
"mversion": "^1.10.0"
},
"main": "index.js",
"scripts": {
"test": "gulp test",
"test": "gulp test && npm run coverage",
"coverage": "babel-node node_modules/.bin/isparta cover --report text --report html --report lcov node_modules/.bin/_mocha",
"lint": "gulp lint && jscs .",
"release-patch": "mversion patch",
"release-minor": "mversion minor",
Expand Down

0 comments on commit a16fb8d

Please sign in to comment.