Skip to content

Commit

Permalink
setup travis
Browse files Browse the repository at this point in the history
  • Loading branch information
pocesar committed Aug 7, 2016
1 parent 59404dc commit 950e7bb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js
node_js:
- "node"

before_install:
- "npm install grunt-cli -g"

script:
- "grunt"
9 changes: 5 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# CHANGELOG

### Changes from 4.x
### 5.0

- Added Travis for tests
- Wrong non-array options now fail the task
- Better flexibility within the options for ES6 tests and source files
- Will try to manually expand minimatch patterns instead of relying on mocha and istanbul ones, so it's easier to debug when using `--verbose`
- `harmony` option is gone, you should select where you'd want it `nodeOptions`, `istanbulOptions`, etc
- Added the `include` option, to filter out the covered information

### Changes from 2.x
### 4.0

Peer dependencies for `mocha` and `istanbul` have been removed. You should `npm install` the following modules yourself:

Expand All @@ -17,13 +18,13 @@ Peer dependencies for `mocha` and `istanbul` have been removed. You should `npm

If using `npm` version < 3, you will need to install `grunt` as well.

### Changes from 1.x
### 2.0

Since Istanbul has 2 versions (ES5 and ES6/harmony), it's up to you to install the desired version of Istanbul,
it's now defined as a a peer dependency.

Introduced new task `istanbul_check_coverage` to enable coverage checking on more than one test run. See below for example.

### Changes from 0.2.0
### 1.0.0

* `mocha_istanbul_check` was removed and became part of the options under the `check` object
8 changes: 5 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
module.exports = function (grunt) {
var nodeExec = require.resolve('.bin/babel-node' + (process.platform === 'win32' ? '.cmd' : ''));

grunt.initConfig({
mocha_istanbul: {
target: {
Expand All @@ -24,7 +26,7 @@ module.exports = function (grunt) {
babel: {
src: 'test/*.es6.js',
options: {
nodeExec: require.resolve('.bin/babel-node'),
nodeExec: nodeExec,
reportFormats: ['html'],
istanbulOptions: ['--verbose'],
root: 'es6',
Expand All @@ -34,11 +36,11 @@ module.exports = function (grunt) {
isparta: {
src: 'test/*.es5.js',
options: {
nodeExec: require.resolve('.bin/babel-node'),
nodeExec: nodeExec,
reportFormats: ['html'],
istanbulOptions: ['--verbose'],
root: 'es6',
scriptPath: require.resolve('isparta/bin/isparta')
scriptPath: require.resolve('isparta/lib/cli')
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[![Dependency Status](https://david-dm.org/pocesar/grunt-mocha-istanbul.png?theme=shields.io)](https://david-dm.org/pocesar/grunt-mocha-istanbul)

[![Build Status](https://travis-ci.org/pocesar/grunt-mocha-istanbul.svg?branch=master)](https://travis-ci.org/pocesar/grunt-mocha-istanbul)

[![NPM](https://nodei.co/npm/grunt-mocha-istanbul.png?downloads=true&stars=true)](https://nodei.co/npm/grunt-mocha-istanbul/)

# grunt mocha istanbul task
Expand Down Expand Up @@ -28,7 +30,7 @@ grunt.initConfig({
mocha_istanbul: {
target: {
options: {
scriptPath: require.resolve('coverage-tool/the/path/to/bin'),
scriptPath: require.resolve('coverage-tool/the/path/to/bin'), // usually in nameofcoveragelibrary/lib/cli
}
}
}
Expand Down Expand Up @@ -58,7 +60,7 @@ Then you'll need to use Isparta, until Istanbul 1.0 is released. (or you can use
mocha_istanbul: {
src: 'test',
options: {
scriptPath: require.resolve('isparta/bin/isparta'),
scriptPath: require.resolve('isparta/lib/cli'),
nodeExec: require.resolve('.bin/babel-node') // for Windows, you MUST use .bin/babel-node.cmd instead
mochaOptions: ['--compilers', 'js:babel-register'], // if you are writing your tests with ES2015+ as well
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "grunt-mocha-istanbul",
"version" : "5.0.1",
"version" : "5.0.2",
"description" : "Almost config-free Istanbul code coverage reporter for Mocha usage in Grunt",
"peerDependencies": {
"grunt": ">=0.4.0"
Expand Down

0 comments on commit 950e7bb

Please sign in to comment.