{"name":"grunt-complexity","description":"Evaluates code maintainability using Halstead and Cyclomatic metrics.","version":"1.0.0-alpha","homepage":"https://github.com/vigetlabs/grunt-complexity.git","author":{"name":"Nate Hunzaker","email":"nate.hunzaker@viget.com","url":"http://viget.com"},"repository":{"type":"git","url":"https://github.com/vigetlabs/grunt-complexity"},"bugs":{"url":"https://github.com/vigetlabs/grunt-complexity/issues"},"license":"MIT","main":"grunt.js","scripts":{"test":"mocha"},"dependencies":{"fs-extra":"~0.30.0","grunt":">=0.4.x","typhonjs-escomplex":"0.0.12"},"devDependencies":{"chai":"3.5.0","grunt":">=0.4.1","grunt-complexity":"https://github.com/vigetlabs/grunt-complexity/tarball/master","grunt-contrib-jshint":"~1.0.0","grunt-simple-mocha":"~0.4.1","mocha":"~3.0.2","sinon":"^1.10.2"},"keywords":["gruntplugin","complexity","halstead","cyclomatic"],"gitHead":"a23ab87516bdf9c1eedf35c1fabab04885e9baf9","_id":"grunt-complexity@1.0.0-alpha","_shasum":"d8cf822c5e03a3af0c93283b8d3a9d34de02fd3a","_from":".","_npmVersion":"3.6.0","_nodeVersion":"5.7.1","_npmUser":{"name":"nhunzaker","email":"nate.hunzaker@viget.com"},"maintainers":[{"name":"lawson","email":"lawson.kurtz@gmail.com"},{"name":"nhunzaker","email":"nate.hunzaker@viget.com"}],"dist":{"shasum":"d8cf822c5e03a3af0c93283b8d3a9d34de02fd3a","tarball":"http://registry-npm.ywwl.com/grunt-complexity/download/grunt-complexity-1.0.0-alpha.tgz","integrity":"sha512-/LO7Bf0zwvKJQTSoF1s84csfy1UTJ2jBOVI7UOtlIFKajtXCRMvj8j7Ft8P7cPuXodaq3xdT/Tc6doGgQi2C7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEG+4kt4kVPiUgEcrwei4wgzEIAW/4pMHZD0vaZBXFUAIgbE9qXianZgvEAnkKnBZnRlGM2jlyR6+WIzxqhUxx8kk="}],"size":143336,"noattachment":false,"key":"/grunt-complexity/-/grunt-complexity-1.0.0-alpha.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/grunt-complexity-1.0.0-alpha.tgz_1471522394720_0.2734353020787239"},"directories":{},"readme":"# Grunt-Complexity\n\n[![Build Status](https://travis-ci.org/vigetlabs/grunt-complexity.svg)](https://travis-ci.org/vigetlabs/grunt-complexity)\n\nA [grunt](http://github.com/gruntjs/grunt/) task that utilizes\n[complexity-report](https://github.com/philbooth/complexityReport.js)\nto evaluate the complexity and maintainability of code.\n\n## Versions\n\n- Use version 0.0.7 for Grunt 0.3.x\n- Use versions 0.1.x for Grunt 0.4.x\n\n![screenshot](https://raw.github.com/vigetlabs/grunt-complexity/master/example.png)\n![screenshot](https://raw.github.com/vigetlabs/grunt-complexity/master/complexity.png)\n\n## Usage\n\n```bash\nnpm install grunt-complexity --save-dev\n```\n\nWithin your grunt file:\n\n```javascript\n    // Project configuration.\n\tgrunt.initConfig({\n\n\t\tcomplexity: {\n\t\t\tgeneric: {\n\t\t\t\tsrc: ['grunt.js', 'tasks/grunt-complexity.js'],\n\t\t\t\texclude: ['doNotTest.js'],\n\t\t\t\toptions: {\n\t\t\t\t\tbreakOnErrors: true,\n\t\t\t\t\tjsLintXML: 'report.xml',         // create XML JSLint-like report\n\t\t\t\t\tcheckstyleXML: 'checkstyle.xml', // create checkstyle report\n\t\t\t\t\tpmdXML: 'pmd.xml',               // create pmd report\n\t\t\t\t\terrorsOnly: false,               // show only maintainability errors\n\t\t\t\t\tcyclomatic: [3, 7, 12],          // or optionally a single value, like 3\n\t\t\t\t\thalstead: [8, 13, 20],           // or optionally a single value, like 8\n\t\t\t\t\tmaintainability: 100,\n\t\t\t\t\thideComplexFunctions: false,     // only display maintainability\n\t\t\t\t\tbroadcast: false                 // broadcast data over event-bus\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t});\n\n\tgrunt.loadNpmTasks('grunt-complexity');\n\tgrunt.registerTask('default', 'complexity');\n```\n\n## What is Cyclomatic and Halstead?\n\nDocumentation on this to come. For now, see [jscomplexity.org](http://jscomplexity.org/complexity)\n\n## Reporter\n\nSet the `broadcast` option to `true` to send the aggregated data over the\ngrunt-event bus.\n\nEmitted events are:\n\n* `grunt-complexity.start`\n* `grunt-complexity.maintainability, payload`\n* `grunt-complexity.end`\n\n```js\n// payload of grunt-complexity.maintainability\n{\n  filepath: /path/to/file,\n  valid: true|false,\n  maintainability: 123.42\n}\n```\n\n## Contributing\n\nThis repo has a submodule, so after you `npm install`, you'll want to run:\n\n```bash\ngit submodule init\ngit submodule update\ncd test/grunt.0.4\nnpm install\ncd ...\n```\n\nTests can be run with `npm test`.\n\n## License\n\n`grunt-complexity` is released under the [MIT License](http://opensource.org/licenses/MIT).\n\n## Contributors\n\n- Nate Hunzaker([nhunzaker](https://github.com/nhunzaker))\n- Golo Roden ([goloroden](https://github.com/goloroden))\n- Tomasz Drwięga ([tomusdrw](https://github.com/tomusdrw))\n- Doug Avery ([averyvery](https://github.com/averyvery))\n- Jozsef Kozma ([jzsfkzm](https://github.com/jzsfkzm))\n- Patrick Williams [(pwmckenna](https://github.com/pwmckenna))\n- Luís Couto ([Couto](https://github.com/Couto))\n- Roman Liutikov ([roman01la](https://github.com/roman01la))\n- Nick Weingartner ([streetlight](https://github.com/streetlight))\n- David Linse ([davidlinse](https://github.com/davidlinse))\n- Tim Carry ([pixelastic](https://github.com/pixelastic))\n\n***\n\n<a href=\"http://code.viget.com\">\n  <img src=\"http://code.viget.com/github-banner.png\" alt=\"Code At Viget\">\n</a>\n\nVisit [code.viget.com](http://code.viget.com) to see more projects from [Viget.](https://viget.com)\n","publish_time":1471522396734,"_cnpm_publish_time":1471522396734,"dist-tags":{"beta":"1.1.0-beta","latest":"1.1.0"}}