Skip to content

Commit 026b55b

Browse files
committed
added ability to use jscr as a module
1 parent 26a3ede commit 026b55b

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = function(srcDir){ console.log(srcDir);
2+
3+
var crawlComplexity = require('./utils/crawl-complexity');
4+
5+
crawlComplexity(srcDir, function(report){ console.log(report) });
6+
7+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jscomplexity",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"preferGlobal" : "true",
55
"bin": {
66
"jscr": "generate-report.js"

sample.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
var jscr = require('./index');
2+
3+
jscr('./utils');

0 commit comments

Comments
 (0)