chetharrison / jsdoccer Goto Github PK
View Code? Open in Web Editor NEWTool to auto document ECMAScript (Java Script) in JSDoc 3 using Esprima.js.
Tool to auto document ECMAScript (Java Script) in JSDoc 3 using Esprima.js.
use recursion to advance the "head" through possible permutations of AST to validate existence of a target syntax. Then apply m/r to fit local target configuration.
Running is on Marionette returns
Generating syntax tree: input/js/marionette.application.js
Saving syntax tree: output/marionette.application.json
Generating syntax tree: input/js/marionette.approuter.js
Saving syntax tree: output/marionette.approuter.json
Generating syntax tree: input/js/marionette.behavior.js
Saving syntax tree: output/marionette.behavior.json
Behavior
description: |
@param {type} options - <param description>
@param {type} view - <param description>
examples:
-
name: Function Body
example: |
```js
{
this.view = view;
this.defaults = _.result(this, 'defaults') || {};
this.options = _.extend({}, this.defaults, options);
this.$ = function () {
return this.view.$.apply(this.view, arguments);
};
this.initialize.apply(this, arguments);
}
```
Generating syntax tree: input/js/marionette.behaviors.js
Saving syntax tree: output/marionette.behaviors.json
Behaviors
description: |
@param {type} view - <param description>
@param {type} behaviors - <param description>
examples:
-
name: Function Body
example: |
```js
{
if (!_.isObject(view.behaviors)) {
return {};
}
behaviors = Behaviors.parseBehaviors(view, behaviors || _.result(view, 'behaviors'));
Behaviors.wrap(view, behaviors, _.keys(methods));
return behaviors;
}
```
BehaviorTriggersBuilder
description: |
@param {type} view - <param description>
@param {type} behaviors - <param description>
examples:
-
name: Function Body
example: |
```js
{
this._view = view;
this._viewUI = _.result(view, 'ui');
this._behaviors = behaviors;
this._triggers = {};
}
```
Generating syntax tree: input/js/marionette.bindEntityEvents.js
Saving syntax tree: output/marionette.bindEntityEvents.json
bindFromStrings
description: |
@param {type} target - <param description>
@param {type} entity - <param description>
@param {type} evt - <param description>
@param {type} methods - <param description>
examples:
-
name: Function Body
example: |
```js
{
var methodNames = methods.split(/\s+/);
_.each(methodNames, function (methodName) {
var method = target[methodName];
if (!method) {
throw new Marionette.Error('Method "' + methodName + '" was configured as an event handler, but does not exist.');
}
target.listenTo(entity, evt, method);
});
}
```
bindToFunction
description: |
@param {type} target - <param description>
@param {type} entity - <param description>
@param {type} evt - <param description>
@param {type} method - <param description>
examples:
-
name: Function Body
example: |
```js
{
target.listenTo(entity, evt, method);
}
```
unbindFromStrings
description: |
@param {type} target - <param description>
@param {type} entity - <param description>
@param {type} evt - <param description>
@param {type} methods - <param description>
examples:
-
name: Function Body
example: |
```js
{
var methodNames = methods.split(/\s+/);
_.each(methodNames, function (methodName) {
var method = target[methodName];
target.stopListening(entity, evt, method);
});
}
```
unbindToFunction
description: |
@param {type} target - <param description>
@param {type} entity - <param description>
@param {type} evt - <param description>
@param {type} method - <param description>
examples:
-
name: Function Body
example: |
```js
{
target.stopListening(entity, evt, method);
}
```
iterateEvents
description: |
@param {type} target - <param description>
@param {type} entity - <param description>
@param {type} bindings - <param description>
@param {type} functionCallback - <param description>
@param {type} stringCallback - <param description>
examples:
-
name: Function Body
example: |
```js
{
if (!entity || !bindings) {
return;
}
if (!_.isFunction(bindings) && !_.isObject(bindings)) {
throw new Marionette.Error({
message: 'Bindings must be an object or function.',
url: 'marionette.functions.html#marionettebindentityevents'
});
}
if (_.isFunction(bindings)) {
bindings = bindings.call(target);
}
_.each(bindings, function (methods, evt) {
if (_.isFunction(methods)) {
functionCallback(target, entity, evt, methods);
} else {
stringCallback(target, entity, evt, methods);
}
});
}
```
Generating syntax tree: input/js/marionette.callbacks.js
Saving syntax tree: output/marionette.callbacks.json
Generating syntax tree: input/js/marionette.collectionview.js
Saving syntax tree: output/marionette.collectionview.json
Generating syntax tree: input/js/marionette.compositeview.js
Saving syntax tree: output/marionette.compositeview.json
Generating syntax tree: input/js/marionette.controller.js
Saving syntax tree: output/marionette.controller.json
Generating syntax tree: input/js/marionette.domRefresh.js
Saving syntax tree: output/marionette.domRefresh.json
handleShow
description: |
@param {type} view - <param description>
examples:
-
name: Function Body
example: |
```js
{
view._isShown = true;
triggerDOMRefresh(view);
}
```
handleRender
description: |
@param {type} view - <param description>
examples:
-
name: Function Body
example: |
```js
{
view._isRendered = true;
triggerDOMRefresh(view);
}
```
triggerDOMRefresh
description: |
@param {type} view - <param description>
examples:
-
name: Function Body
example: |
```js
{
if (view._isShown && view._isRendered && isInDOM(view)) {
if (_.isFunction(view.triggerMethod)) {
view.triggerMethod('dom:refresh');
}
}
}
```
isInDOM
description: |
@param {type} view - <param description>
examples:
-
name: Function Body
example: |
```js
{
return Backbone.$.contains(documentElement, view.el);
}
```
Generating syntax tree: input/js/marionette.error.js
Saving syntax tree: output/marionette.error.json
Generating syntax tree: input/js/marionette.helpers.js
Saving syntax tree: output/marionette.helpers.json
Generating syntax tree: input/js/marionette.itemview.js
Saving syntax tree: output/marionette.itemview.json
Generating syntax tree: input/js/marionette.layoutview.js
Saving syntax tree: output/marionette.layoutview.json
Generating syntax tree: input/js/marionette.module.js
Saving syntax tree: output/marionette.module.json
Generating syntax tree: input/js/marionette.object.js
Saving syntax tree: output/marionette.object.json
Generating syntax tree: input/js/marionette.region.js
Saving syntax tree: output/marionette.region.json
Generating syntax tree: input/js/marionette.regionManager.js
Saving syntax tree: output/marionette.regionManager.json
Generating syntax tree: input/js/marionette.renderer.js
Saving syntax tree: output/marionette.renderer.json
Generating syntax tree: input/js/marionette.templatecache.js
Saving syntax tree: output/marionette.templatecache.json
Generating syntax tree: input/js/marionette.triggermethod.js
Saving syntax tree: output/marionette.triggermethod.json
getEventName
description: |
@param {type} match - <param description>
@param {type} prefix - <param description>
@param {type} eventName - <param description>
examples:
-
name: Function Body
example: |
```js
{
return eventName.toUpperCase();
}
```
Generating syntax tree: input/js/marionette.view.js
Saving syntax tree: output/marionette.view.json
Will need to bind parseBranch
function to access Lookup attribute.
Currently if two files in different folders have the same name the last one will overwrite the first.
nest syntax targets within parents
see src/parsers/json-api-to-docs.js
Check marionette.bindEntityEvents.js
example
Default should not overwrite existing files.
from app-router.yaml
missing parameter name
_getController:
description: |
@api private
@returns {<type>} -
check the log statement in lookup#parse
with corresponding JSON.
gitty.js
depends on pty.js
. Even thought the bug was supposed to have been fixed in the latest master, and gitty.js
is loading the latest direct from the repo, it still bombs.
See this issue: chjj/pty.js#83
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.