README (node-pajsdoc)
Installation
npm install node-pajsdoc
Quick Start
const PaJSDoc = ;let pajsdoc = null;let json_obj = null;pajsdoc = 'test/sample/dirmodule.c';json_obj = pajsdoc;if item_node && item_nodefunctionconsole;pajsdoc = "/**" +" * @function FullPath" +" */";json_obj = jsdoc;if item_node && item_nodefunctionconsole;
Syntax
@TAG {TYPE} `NAME` DESC
Symbol | Item | Explaination |
---|---|---|
@ | TAG | |
{} | TYPE | |
`` | NAME | |
Text | DESC |
Test - Unit Test
./node_modules/mocha/bin/mocha test
Examples
Example 1
/**
* @module {Composite} `DIR_MODULE` Dir module
* @member {DIR_PUBLIC_FUNC_DECLARATION}
* @namespace RtLib.Dir
* @author dougpuob <dougpuob@gmail.com>
*/
struct _DIR_MODULE {
WRAP_STATIC_PUBLIC_DATA( DIR_PUBLIC_DATA_DECLARATION() );
WRAP_STATIC_PUBLIC_FUNC( DIR_PUBLIC_FUNC_DECLARATION() );
};
Example 2
/**
* @module {Parts} `DIR_MODULE` Dir library
* @namespace RtLib.Dir
* @author dougpuob <dougpuob@gmail.com>
*/
Example 3
/**
* @function `_RtlDir_ReadDir` This is a descrption.
* @summary This is a summary text
* @description This is a summary text
* @parameter {char*} `szPath` This is a descrption.
* @parameter {bool} `bRecursive` This is a descrption.
* @parameter {FILE_ENTRY*} `pFileEntry` This is a descrption.
* @parameter {RECORD_DATA*} `pRecordData` This is a descrption.
* @return {FILE_ENTRY*}
* @author dougpuob <dougpuob@gmail.com>
*/
FILE_ENTRY*
_RtlDir_ReadDir(
IN OUT char* const szPath,
IN bool const bRecursive,
IN FILE_ENTRY* const pFileEntry,
IN OUT RECORD_DATA* const pRecordData
)
Example 4
/**
* @@class {} ``
* @function `_RtlDir_ReadDir` This is a descrption.
* @summary This is a summary text
* @description This is a summary text
* @parameter {char*} `szPath` This is a descrption.
* @parameter {bool} `bRecursive` This is a descrption.
* @parameter {FILE_ENTRY*} `pFileEntry` This is a descrption.
* @parameter {RECORD_DATA*} `pRecordData` This is a descrption.
* @return {FILE_ENTRY*}
* @author dougpuob <dougpuob@gmail.com>
*/
TAG NAME | TAG DESCRIPTION |
---|---|
@class @constructor |
Marks a function as a constructor |
@classdesc | ?? |
@module | Document a JavaScript module. |
@function @method |
Describe a function or method. |
@summary | A shorter version of the full description. |
@desc @description |
Describe a symbol. |
@deprecated | Marks a method as deprecated |
@throws @exception |
Documents an exception thrown by a method |
@exports | Identifies a member that is exported by the module |
@param @parameter |
Documents a method parameter; a datatype indicator can be added between curly |
@private | Signifies that a member is private |
@return @returns |
Documents a return value |
@see | Documents an association to another object |
@todo | Documents something that is missing/open |
@this | Specifies the type of the object to which the keyword "this" refers within a function. |
@version | Provides the version number of a library |
@virtual @abstract |
This member must be implemented (or overridden) by the inheritor. |
@deprecated | Document that this is no longer the preferred way. |
@example | Provide an example of how to use a documented item. |
@member | ??? |
@memberof | This symbol belongs to a parent symbol. |
@namespace | Document a namespace object. |
@see | Refer to some other documentation for more information. |
@static | Document a static member. |
@version | Documents the version number of an item. |
@author | Developer's name |
Test
$ mochaPaJSDoc class- - single file√ should return true- - Two files by array√ should return true-√ should return true-√ should return true-√ should return true- - @parameter {} TYPE `NAME` DESCRIPTION√ should return true- - @parameter `NAME` DESCRIPTION√ should return true- - @- @function `NAME`√ should return true- SearchFirst() - @function {TYPE}√ should return true- - @description DESCRIPTION√ should return true- - @summary DESCRIPTION√ should return true- - @return TYPE√ should return true- - @return TYPE DESCRIPTION√ should return true- - @author DESCRIPTION√ should return true15
Resource
- node-pajsdoc
https://github.com/dougpuob/node-pajsdoc.git
License
MIT