Skip to content

Commit 56a5422

Browse files
committed
Update README.md
1 parent 4007570 commit 56a5422

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

README.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,31 @@
11
#jscomplexity
22

33

4-
Command-line tool to generate a complexity report on file tree Javascript files. It is based on [complexityReport.js](https://github.com/philbooth/complexityReport.js) module results. Report stands in a .html file containing graphical representation of file tree.
4+
Command-line tool to generate a complexity report on file tree Javascript files. It is based on [complexityReport.js](https://github.com/philbooth/complexityReport.js) module results. Report stands in a .html file containing graphical representation of file tree when used from command-line.
55

6-
NB: /!\ Linux/OS compliant only for now.
6+
NB: **/!\** Linux/OS compliant only for now.
77

88

99
###Installation
1010

11-
<code>npm install -g jscomplexity</code>
11+
<code>npm install [-g] jscomplexity</code>
1212

1313

14-
###Usage
14+
###Command-line usage
1515

1616
<code> $ jscr &lt;directory containing JS&gt; [optional : &lt;generated report directory, defaults current&gt;] </code>
1717

1818
e.g.:
1919
<code>$ jscr .</code>
2020
will generate report in current directory, using it as root for file tree walk-through.
21+
22+
23+
###Module usage
24+
25+
<pre>
26+
var jscr = require('jscomplexity');
27+
28+
jscr('/path/to/js/dir', function(err, report){
29+
if (!err) console.log(report);
30+
});
31+
</pre>

0 commit comments

Comments
 (0)