Skip to content

Commit 906a386

Browse files
committed
Updated docs
1 parent 89e5f45 commit 906a386

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
Use [dox](https://github.com/visionmedia/dox) to automatically generate beautiful html documentation.
44

5-
Outputted HTML is based on templates and css from [ZURB's Foundation](http://foundation.zurb.com/) and syntax highlighting is done by [Prism.js](http://prismjs.com/).
5+
Outputted HTML is based on templates and css from [ZURB's Foundation](http://foundation.zurb.com/) and syntax highlighting is done by [Prism.js](http://prismjs.com/).
66

77
## Installation
88
Install the module with: `npm install dox-foundation -g`
99

1010
## Documentation
1111
```
1212
$ dox-foundation --help
13-
13+
1414
Usage: dox-foundation [options]
1515
1616
Options:
@@ -23,6 +23,7 @@ $ dox-foundation --help
2323
-s, --source <source> The folder which should get parsed
2424
-i, --ignore <directories> Comma seperated list of directories to ignore. Default: test,public,static,views,templates
2525
-T, --target <target> The folder which will contain the results. Default: <process.cwd()>/docs
26+
--template <jade template> The jade template file to use
2627
2728
Examples:
2829
@@ -49,7 +50,8 @@ In lieu of a formal styleguide, take care to maintain the existing coding style.
4950

5051
* Thanks to [dox-basic](https://github.com/jepso/dox-basic) for the inspiration and much of the original code.
5152
* [@sdepold](https://github.com/sdepold)
53+
* [@fgribreau](https://twitter.com/fgribreau)
5254

5355
## License
54-
Copyright (c) 2012 P'unk Avenue
56+
Copyright (c) 2012 P'unk Avenue
5557
Licensed under the MIT license.

lib/dox-foundation.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@ exports.template = fs.readFileSync(path.resolve(__dirname,'../views/template.jad
2929
* Parse source code to produce documentation
3030
*/
3131
exports.parse = function(file, files, options){
32-
options = options || { title: 'Documentation' };
33-
34-
file.dox = file.dox.filter(exports.shouldPass);
35-
32+
options = options || { title: 'Documentation' };
33+
file.dox = file.dox.filter(exports.shouldPass);
3634
options.comments = file.dox;
3735

3836
options.structure = files.map(function(file){
@@ -48,6 +46,11 @@ exports.parse = function(file, files, options){
4846
return jade.compile(exports.template)(options);
4947
};
5048

49+
/**
50+
* Test if a method should be ignored or not
51+
* @param {Object} method
52+
* @return {Boolean} true if the method is not private nor must be ignored
53+
*/
5154
exports.shouldPass = function(method){
5255
if(method.isPrivate){return false;}
5356
if(method.ignore){return false;}

0 commit comments

Comments
 (0)