Last active
July 20, 2016 03:37
-
-
Save coreybutler/c950de4f3cc0a3b6c066dba46c8f888e to your computer and use it in GitHub Desktop.
Documentation Metadata Generator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"classes": { | |
"Test": { | |
"line": 11, | |
"description": "This is a test class. No extension.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"extends": "john", | |
"methods": { | |
"RollCall": { | |
"line": 39, | |
"description": "Some method.", | |
"tags": {}, | |
"exceptions": [], | |
"events": { | |
"testEvent": "This is a test event." | |
}, | |
"static": false, | |
"parameters": [ | |
{ | |
"domain": null, | |
"_events": {}, | |
"_eventsCount": 0, | |
"description": "Name of person.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"type": "string", | |
"required": true, | |
"default": null | |
} | |
], | |
"generator": false, | |
"returns": { | |
"type": "void", | |
"description": "No return value." | |
} | |
}, | |
"RollCall2": { | |
"line": 54, | |
"description": "Some other method.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"static": false, | |
"parameters": [ | |
{ | |
"domain": null, | |
"_events": {}, | |
"_eventsCount": 0, | |
"description": "Name of person.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"type": "string", | |
"required": true, | |
"default": null | |
} | |
], | |
"generator": false, | |
"returns": { | |
"type": "void", | |
"description": "No return value." | |
} | |
} | |
}, | |
"properties": { | |
"test2": { | |
"line": 19, | |
"description": null, | |
"tags": { | |
"cfgproperty": { | |
"tag": "cfgproperty", | |
"type": "string", | |
"name": "test2", | |
"optional": false, | |
"description": "Some prop.", | |
"line": 18, | |
"source": "@cfgproperty {string} test2\nSome prop." | |
} | |
}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 19, | |
"linesetter": 19, | |
"required": false, | |
"default": null, | |
"type": "string" | |
} | |
}, | |
"configuration": { | |
"test2": { | |
"line": 19, | |
"description": null, | |
"tags": { | |
"cfgproperty": { | |
"tag": "cfgproperty", | |
"type": "string", | |
"name": "test2", | |
"optional": false, | |
"description": "Some prop.", | |
"line": 18, | |
"source": "@cfgproperty {string} test2\nSome prop." | |
} | |
}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 19, | |
"linesetter": 19, | |
"required": false, | |
"default": null, | |
"type": "string" | |
}, | |
"age": { | |
"line": 30, | |
"description": null, | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 30, | |
"linesetter": 30, | |
"required": false, | |
"default": 18, | |
"type": "number" | |
} | |
}, | |
"sourcefile": "test/demo.js" | |
}, | |
"MyTest": { | |
"line": 10, | |
"description": "This is a description.", | |
"tags": { | |
"singleton": true | |
}, | |
"exceptions": [], | |
"events": {}, | |
"extends": "EventEmitter", | |
"methods": { | |
"iAmMethod": { | |
"line": 50, | |
"description": "A test method.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"static": false, | |
"parameters": [ | |
{ | |
"line": 50, | |
"description": "Some X param.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"type": "string", | |
"required": true, | |
"default": null | |
}, | |
{ | |
"line": 50, | |
"description": "Some number.", | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"type": "number", | |
"required": false, | |
"default": 1 | |
} | |
], | |
"generator": false, | |
"returns": { | |
"type": "void", | |
"description": "No return value." | |
} | |
} | |
}, | |
"properties": { | |
"generic": { | |
"line": 13, | |
"description": null, | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 13, | |
"linesetter": 13, | |
"required": false, | |
"default": null, | |
"type": "number" | |
}, | |
"a": { | |
"line": 20, | |
"description": null, | |
"tags": { | |
"cfgproperty": { | |
"type": "object", | |
"name": "a", | |
"optional": false, | |
"description": "A config property.", | |
"line": 19, | |
"source": "@cfgproperty {object} a\nA config property." | |
} | |
}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": true, | |
"private": true, | |
"protected": false, | |
"linegetter": 20, | |
"linesetter": 20, | |
"required": false, | |
"default": null, | |
"type": "callundefined" | |
}, | |
"b": { | |
"line": 21, | |
"description": null, | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": true, | |
"protected": false, | |
"linegetter": 21, | |
"linesetter": 21, | |
"required": false, | |
"default": null, | |
"type": "number" | |
}, | |
"c": { | |
"line": 27, | |
"description": null, | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 27, | |
"linesetter": 27, | |
"required": false, | |
"default": null, | |
"type": "callundefined" | |
}, | |
"data": { | |
"line": 33, | |
"description": null, | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 33, | |
"linesetter": 37, | |
"required": false, | |
"default": null, | |
"type": null | |
}, | |
"iAmReadOnly": { | |
"line": 39, | |
"description": null, | |
"tags": {}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": false, | |
"private": false, | |
"protected": false, | |
"linegetter": 39, | |
"linesetter": 39, | |
"required": false, | |
"default": null, | |
"type": null | |
} | |
}, | |
"configuration": { | |
"a": { | |
"line": 20, | |
"description": null, | |
"tags": { | |
"cfgproperty": { | |
"type": "object", | |
"name": "a", | |
"optional": false, | |
"description": "A config property.", | |
"line": 19, | |
"source": "@cfgproperty {object} a\nA config property." | |
} | |
}, | |
"exceptions": [], | |
"events": {}, | |
"readonly": true, | |
"private": true, | |
"protected": false, | |
"linegetter": 20, | |
"linesetter": 20, | |
"required": false, | |
"default": null, | |
"type": "callundefined" | |
} | |
}, | |
"sourcefile": "test/demo2.js" | |
} | |
}, | |
"globals": { | |
"test/demo.js": { | |
"ngn": { | |
"lines": [ | |
3 | |
], | |
"type": "npm" | |
}, | |
"fs": { | |
"lines": [ | |
4 | |
], | |
"type": "native" | |
} | |
}, | |
"test/demo2.js": { | |
"events": { | |
"lines": [ | |
3 | |
], | |
"type": "native" | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
require('ngn') | |
const fs = require('fs') | |
/** | |
* @class Test | |
* This is a test class. No extension. | |
* @extends john | |
*/ | |
function Blah () { | |
Object.defineProperties(this, { | |
test: NGN.const(1), | |
/** | |
* @cfgproperty {string} test2 | |
* Some prop. | |
*/ | |
test2: { | |
enumerable: false, | |
writable: true, | |
configurable: false, | |
value: 'test' | |
}, | |
/** | |
* @cfg {number} [age=18] | |
* The age of someone. | |
*/ | |
/** | |
* @method RollCall | |
* Some method. | |
* @param {string} person | |
* Name of person. | |
* @fires testEvent | |
* This is a test event. | |
*/ | |
RollCall: { | |
enumerable: true, | |
writable: false, | |
configurable: false, | |
value: function (peep) { | |
console.log('Yo', peep) | |
} | |
}, | |
/** | |
* @method RollCall2 | |
* Some other method. | |
* @param {string} person | |
* Name of person. | |
*/ | |
RollCall2: { | |
enumerable: true, | |
writable: false, | |
configurable: false, | |
value: function (peep) { | |
console.log('Yo', peep) | |
} | |
} | |
}) | |
} | |
module.exports = Blah |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const EventEmitter = require('events').EventEmitter | |
/** | |
* This is a description. | |
* @private | |
* @singleton | |
*/ | |
class MyTest extends EventEmitter { | |
constructor () { | |
this.generic = 1 | |
Object.defineProperties(this, { | |
/** | |
* @cfgproperty {object} a | |
* A config property. | |
*/ | |
a: NGN.privateconst({}), | |
b: { | |
enumerable: false, | |
writable: true, | |
configurable: false, | |
value: 1 | |
}, | |
c: NGN.public(function () { | |
return 'yo' | |
}) | |
}) | |
} | |
get data () { | |
return 1 | |
} | |
set data (val) {} | |
get iAmReadOnly () { | |
return 'test' | |
} | |
/** | |
* A test method. | |
* @param {string} x | |
* Some X param. | |
* @param {number} y | |
* Some number. | |
*/ | |
iAmMethod (x, y = 1) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment