{
  "name": "grunt-mip",
  "description": "Headless Blanket.js code coverage and Mocha testing via PhantomJS - with coverage supports",
  "version": "1.0.8",
  "homepage": "https://github.com/zudd/grunt-mip",
  "author": {
    "name": "Hung Luu",
    "email": "luuhug@gmail.com"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/zudd/grunt-mip.git"
  },
  "bugs": {
    "url": "https://github.com/zudd/grunt-mip/issues"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "https://github.com/zudd/grunt-mip/blob/master/LICENSE-MIT"
    }
  ],
  "main": "Gruntfile.js",
  "engines": {
    "node": ">= 0.8.0"
  },
  "scripts": {
    "test": "grunt test"
  },
  "dependencies": {
    "blanket": "~1.1.6",
    "grunt-lib-phantomjs": "~0.6.0",
    "mocha": "~2.0.1",
    "lodash": "~2.4.1"
  },
  "peerDependencies": {
    "grunt": "~0.4"
  },
  "devDependencies": {
    "grunt": "~0.4.1",
    "grunt-contrib-connect": "~0.5.0",
    "grunt-contrib-jshint": "~0.7.1"
  },
  "keywords": [
    "gruntplugin",
    "blanket",
    "blanketjs",
    "coverage",
    "mocha",
    "test",
    "phantomjs"
  ],
  "directories": {
    "example": "example"
  },
  "license": "MIT",
  "contributors": [
    {
      "name": "Hung Luu",
      "email": "luuhug@gmail.com"
    },
    {
      "name": "Kelly Miyashiro",
      "email": "miyashiro.kelly@gmail.com"
    },
    {
      "name": "Tony Narlock",
      "email": "tony@git-pull.com"
    }
  ],
  "readme": "A fork from [Grunt-blanket-mocha](https://github.com/GruntBlanketMocha/grunt-blanket-mocha) for automatically generating coverage data and save to file.\r\n\r\n## Supports\r\n\r\n[Istanbul](https://github.com/gotwarlost/istanbul) or [JSCover](https://github.com/tntim96/JSCover) or [JScoverage](https://www.npmjs.com/package/jscoverage)\r\n\r\n## Install\r\n\r\n```bash\r\nnpm i --save-dev grunt-mip\r\n```\r\n\r\n## How to use\r\n\r\nA base usage guideline can be found on [grunt-blanket-mocha](https://github.com/GruntBlanketMocha/grunt-blanket-mocha#readme)\r\n\r\n## Example\r\n\r\n**Step 1 . Install istanbul and grunt-mip and optional grunt-contrib-connect**\r\n\r\n```bash\r\nnpm i -g istanbul\r\nnpm i -D grunt-mip\r\nnpm i -D grunt-contrib-connect\r\n```\r\n\r\n**Step 2. Instrument your js files**\r\n\r\n```bash\r\nistanbul instrument test/index.js > test/index.cov.js\r\nistanbul instrument test/plugin.js > test/plugin.cov.js\r\n```\r\n\r\n**Step 3 . Config gruntfile**\r\n\r\n```javascript\r\n// Gruntfile.js\r\nmodule.exports = function(grunt) {\r\n\t// Project configuration.\r\n\tgrunt.initConfig({\r\n\t\tmip: {\r\n\t\t\tall: {\r\n\t\t\t\toptions: {\r\n\t\t\t\t\trun: false,\r\n\t\t\t\t\turls: [\r\n\t\t\t\t\t\t'http://localhost/test/'\r\n\t\t\t\t\t],\r\n\t\t\t\t\ttimeout: 50000,\r\n\t\t\t\t\treporter: 'Dot'\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tconnect: {\r\n\t\t\tall: {\r\n\t\t\t\toptions: {\r\n\t\t\t\t\tport: 80,\r\n\t\t\t\t\tbase: '.',\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\r\n\t// Load plugins\r\n\tgrunt.loadNpmTasks('grunt-contrib-connect');\r\n\tgrunt.loadNpmTasks('grunt-mip');\r\n\r\n\t// Task to run tests\r\n\tgrunt.registerTask('test', ['connect', 'mip']);\r\n```\r\n\r\n**Step 4. Run your test(s) then convert coverage.json to html or lcov ( or something else)**\r\n\r\n\r\n```bash\r\ngrunt test && istanbul report --root coverage lcov\r\n```\r\n\r\nAs you should notice, after running this task, a ```coverage``` folder will be created in the root folder, contains a file named ```coverage.json```. This file contains coverage object generated by [Istanbul](https://github.com/gotwarlost/istanbul) or [JSCover](https://github.com/tntim96/JSCover) or [JScoverage](https://www.npmjs.com/package/jscoverage)\r\n\r\nYou should used **only one** in mentioned 3 tools in a test case because you don't want to mix their responses :)\r\n\r\nIf you want to change coverage tool, please delete the ```coverage``` folder before running a new test\r\n\r\n\r\n**NOTE :** This tool is designed to merge new reponses from test to test, it means :\r\n\r\n```bash\r\nWhen you run a test on http://localhost/test.html the first time, its results is saved on coverage.json file\r\n\r\nThen you run a new test on http://localhost/another-test.html, its results will be merged to the old results and saved to coverage.json\r\n```\r\n\r\nSo if you don't intend to merge their results, you should delete or backup the ```coverage.json``` file somewhere outside the ```coverage``` folder\r\n\r\n\r\n## Contribute\r\n\r\ngrunt-mip is released under MIT license, feel free to contribute or provide a bug fix\r\n\r\nHere is some simple steps\r\n\r\n1. Fork, then clone the repo at git@github.com:your-username/grunt-mip.git\r\n\r\n2. Push to your fork and submit a [pull request](https://github.com/zudd/grunt-mip/compare/)\r\n\r\n3. Write a good commit message\r\n\r\n\r\nEnjoy.",
  "readmeFilename": "README.md",
  "gitHead": "371330a2971c24252d16792113c0778fb5e51554",
  "_id": "grunt-mip@1.0.6",
  "_shasum": "bd1093045ef561662e2ef2837656e3c4214ad1f3",
  "_from": "grunt-mip@>=1.0.6 <2.0.0"
}
