mirror of
https://github.com/facebook/react.git
synced 2026-02-27 03:07:57 +00:00
NEW grunt complexity reporting task
This commit is contained in:
@@ -23,7 +23,8 @@ module.exports = function(grunt) {
|
||||
npm: require('./grunt/config/npm'),
|
||||
clean: ['./build', './*.gem', './docs/_site', './examples/shared/*.js', '.module-cache'],
|
||||
jshint: require('./grunt/config/jshint'),
|
||||
compare_size: require('./grunt/config/compare_size')
|
||||
compare_size: require('./grunt/config/compare_size'),
|
||||
complexity: require('./grunt/config/complexity')
|
||||
});
|
||||
|
||||
grunt.config.set('compress', require('./grunt/config/compress'));
|
||||
|
||||
9
grunt/config/complexity.js
Normal file
9
grunt/config/complexity.js
Normal file
@@ -0,0 +1,9 @@
|
||||
module.exports.generic = {
|
||||
src: ['./build/modules/**/*.js'],
|
||||
options: {
|
||||
errorsOnly: false, // show only maintainability errors
|
||||
cyclomatic: 3,
|
||||
halstead: 8,
|
||||
maintainability: 100
|
||||
}
|
||||
};
|
||||
@@ -59,7 +59,8 @@
|
||||
"es5-shim": "~2.1.0",
|
||||
"wd": "~0.2.2",
|
||||
"sauce-tunnel": "~1.1.0",
|
||||
"coverify": "~0.1.1"
|
||||
"coverify": "~0.1.1",
|
||||
"grunt-complexity": "~0.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
|
||||
Reference in New Issue
Block a user