Package Exports
- jscomplex
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jscomplex) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
jscomplex 
A Sweet reporter for maintainability index via escomplex
Pre-requisites
node version >= 4.2.6
Install Globally
sudo npm install jscomplex -g
Install like a development dependency
npm install --save-dev jscomplex
How to use
Use it from npm scripts
package.json
"scripts": {
"complex": "jscomplex ./js/**/*.js"
}
Then in a terminal:
npm run complex
Use
jscomplex "['./lib/*.js', './bin/*.js']"
Help
jscomplex -h
Output
Usage: jscomplex.bin [options] <path>
Options:
-h, --help output usage information
-V, --version output the version number
-f, --format <format> specify the output format of the report
-M, --mi <maintainability index> specify the per-module maintainability index threshold
-l, --logicalor disregard operator || as source of cyclomatic complexity
-w, --switchcase disregard switch statements as source of cyclomatic complexity
-i, --forin treat for...in statements as source of cyclomatic complexity
-t, --trycatch treat catch clauses as source of cyclomatic complexity
-n, --newmi use the Microsoft-variant maintainability index (scale of 0 to 100)
-Q, --nocoresize don't calculate core size or visibility matrix
Examples:
# Analize all *.js files from "lib" folder
$ jscomplex "['./lib/*.js']"
# Analize all *.js files from "lib" and "bin" folder
$ jscomplex "['./lib/*.js', './bin/*.js']"
# Analize all *.js files
$ jscomplex "['./**/*.js']"