Skip to content

Commit

Permalink
add JsDoc3 + genrated doc @see issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstrat committed Nov 15, 2011
1 parent dd05239 commit 97ff150
Show file tree
Hide file tree
Showing 15 changed files with 6,559 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "doc/jsdoc3"]
path = doc/jsdoc3
url = https://github.com/micmath/jsdoc.git
23 changes: 23 additions & 0 deletions Jakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
var DIST_DIR = __dirname + '/dist/';
var SPEC_DIST = __dirname + '/spec/dist/';

var DOC_DIR = __dirname + '/doc/jsdoc/';
var JsDoc3_CONF = __dirname + '/doc/JsDocConf.json';
var JsDoc3_EXEC = __dirname + '/doc/jsdoc3/jsdoc';

var LIB_DIR = {
'kadoh' : __dirname + '/lib/client',
'socket.io-client' : __dirname + '/node_modules/socket.io-client/dist',
Expand Down Expand Up @@ -35,6 +39,8 @@ task('default', [], function() {

}, true);

///*********************TEST***********************

namespace('test', function() {

desc('Testing in node');
Expand Down Expand Up @@ -102,6 +108,23 @@ namespace('test', function() {

});

});
//****************DOC**************
desc('Generate documentation using JsDoc3');
task('doc', ['default'], function(){
console.log('Generating documentation..');

var cmd = JsDoc3_EXEC+' --recurse '+LIB_DIR.kadoh+' --destination '+DOC_DIR +' -c '+JsDoc3_CONF;
console.log(cmd);

PROC.exec(cmd, function (error, stdout, stderr) {
console.log('[Generating Doc] ' + stdout);
console.error('[Generating Doc] Error :' + stderr);
if (error !== null) {
console.error('[Generating Doc] Error : ' + error);
}
});

});

//**************BUILD****************
Expand Down
16 changes: 16 additions & 0 deletions doc/JsDocConf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"tags": {
"allowUnknownTags": true
},

"source": {
"includePattern": ".+\\.js(doc)?$",
"excludePattern": "(^|\\/)_|when\\.js"
},

"plugins": [
"plugins/markdown"
],

"jsVersion": 180
}
Loading

0 comments on commit 97ff150

Please sign in to comment.