From 729888e133a5d2bf3739692981becbd823f3a448 Mon Sep 17 00:00:00 2001 From: Caridy Patino Date: Mon, 21 Apr 2014 21:46:09 -0400 Subject: [PATCH] docs for v0.3.50 after PR #227 and #222 --- docs/args/partials/help.mustache | 2 +- output/api/classes/CLI.html | 2 +- output/api/classes/DocBuilder.html | 2 +- output/api/classes/DocParser.html | 2 +- output/api/classes/DocView.html | 2 +- output/api/classes/Files.html | 2 +- output/api/classes/Help.html | 2 +- output/api/classes/Main.html | 2 +- output/api/classes/Options.html | 2 +- output/api/classes/Server.html | 2 +- output/api/classes/Utils.html | 2 +- output/api/classes/YUIDoc.html | 96 ++++++++++++++++++++++++-- output/api/data.json | 25 +++++-- output/api/files/lib_builder.js.html | 2 +- output/api/files/lib_cli.js.html | 2 +- output/api/files/lib_docparser.js.html | 6 +- output/api/files/lib_docview.js.html | 2 +- output/api/files/lib_files.js.html | 2 +- output/api/files/lib_help.js.html | 2 +- output/api/files/lib_index.js.html | 2 +- output/api/files/lib_options.js.html | 2 +- output/api/files/lib_server.js.html | 2 +- output/api/files/lib_utils.js.html | 2 +- output/api/files/lib_yuidoc.js.html | 44 +++++++++++- output/api/index.html | 2 +- output/api/modules/yuidoc.html | 2 +- output/args/index.html | 2 +- 27 files changed, 179 insertions(+), 38 deletions(-) diff --git a/docs/args/partials/help.mustache b/docs/args/partials/help.mustache index 0563c350..7710dd17 100644 --- a/docs/args/partials/help.mustache +++ b/docs/args/partials/help.mustache @@ -1,7 +1,7 @@ YUI Doc generates API documentation from a modified JavaDoc syntax. -Current version (0.3.49) +Current version (0.3.50) Usage: yuidoc diff --git a/output/api/classes/CLI.html b/output/api/classes/CLI.html index b5020f14..c27699fa 100644 --- a/output/api/classes/CLI.html +++ b/output/api/classes/CLI.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/DocBuilder.html b/output/api/classes/DocBuilder.html index c0936534..3eb8b421 100644 --- a/output/api/classes/DocBuilder.html +++ b/output/api/classes/DocBuilder.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/DocParser.html b/output/api/classes/DocParser.html index 290dcb53..a6dd5b6e 100644 --- a/output/api/classes/DocParser.html +++ b/output/api/classes/DocParser.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/DocView.html b/output/api/classes/DocView.html index a8eee88e..5ddf6dee 100644 --- a/output/api/classes/DocView.html +++ b/output/api/classes/DocView.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/Files.html b/output/api/classes/Files.html index b689060a..59cc1e70 100644 --- a/output/api/classes/Files.html +++ b/output/api/classes/Files.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/Help.html b/output/api/classes/Help.html index 80cf9dd4..19e6b2d2 100644 --- a/output/api/classes/Help.html +++ b/output/api/classes/Help.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/Main.html b/output/api/classes/Main.html index 445ac96b..56223f41 100644 --- a/output/api/classes/Main.html +++ b/output/api/classes/Main.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/Options.html b/output/api/classes/Options.html index 18f3adee..bdd6d791 100644 --- a/output/api/classes/Options.html +++ b/output/api/classes/Options.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/Server.html b/output/api/classes/Server.html index d8425370..e1f2ed32 100644 --- a/output/api/classes/Server.html +++ b/output/api/classes/Server.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/Utils.html b/output/api/classes/Utils.html index d489b838..1cf31df1 100644 --- a/output/api/classes/Utils.html +++ b/output/api/classes/Utils.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
diff --git a/output/api/classes/YUIDoc.html b/output/api/classes/YUIDoc.html index 437b3dbe..f567fdc3 100644 --- a/output/api/classes/YUIDoc.html +++ b/output/api/classes/YUIDoc.html @@ -19,7 +19,7 @@

- API Docs for: 0.3.49 + API Docs for: 0.3.50
@@ -289,6 +289,13 @@

Methods

+ + +
  • + runPreprocessors + + +
  • @@ -739,7 +746,7 @@

    run

    - lib/yuidoc.js:334 + lib/yuidoc.js:376

    @@ -773,6 +780,82 @@

    Returns:

    +
  • + + +
    +

    runPreprocessors

    + + + () + + + + + Object + + + + + + + private + + + + + + + + + + +
    + + + +

    + + Defined in + + + + + lib/yuidoc.js:248 + +

    + + + + + +
    + +
    +

    Applies preprocessors to the data tree. +This function first clones the data and operates on the clone.

    + +
    + + + + +
    +

    Returns:

    + +
    + + + Object: + +

    The mutated data

    + + +
    +
    + + +
    @@ -881,7 +964,7 @@

    writeJSON

    - lib/yuidoc.js:248 + lib/yuidoc.js:287

    @@ -892,7 +975,8 @@

    writeJSON

    -

    Writes the parser JSON data to disk.

    +

    Writes the parser JSON data to disk. +Applies preprocessors, if any.

    @@ -1020,7 +1104,7 @@

    endtime

    - lib/yuidoc.js:362 + lib/yuidoc.js:404

    @@ -1300,7 +1384,7 @@

    starttime

    - lib/yuidoc.js:340 + lib/yuidoc.js:382

    diff --git a/output/api/data.json b/output/api/data.json index d44f2351..aa97a6dd 100644 --- a/output/api/data.json +++ b/output/api/data.json @@ -3,7 +3,7 @@ "name": "yuidoc-root", "logo": "http://yuilibrary.com/img/yui-logo.png", "description": "YUIDoc, YUI's JavaScript Documentation engine.", - "version": "0.3.49" + "version": "0.3.50" }, "files": { "lib/builder.js": { @@ -2349,7 +2349,22 @@ { "file": "lib/yuidoc.js", "line": 248, - "description": "Writes the parser JSON data to disk.", + "description": "Applies preprocessors to the data tree. \nThis function first clones the data and operates on the clone.", + "itemtype": "method", + "name": "runPreprocessors", + "access": "private", + "tagname": "", + "return": { + "description": "The mutated data", + "type": "Object" + }, + "class": "YUIDoc", + "module": "yuidoc" + }, + { + "file": "lib/yuidoc.js", + "line": 287, + "description": "Writes the parser JSON data to disk.\nApplies preprocessors, if any.", "itemtype": "method", "name": "writeJSON", "params": [ @@ -2370,7 +2385,7 @@ }, { "file": "lib/yuidoc.js", - "line": 334, + "line": 376, "description": "Process the config, walk the file tree and write out the JSON data.", "itemtype": "method", "name": "run", @@ -2383,7 +2398,7 @@ }, { "file": "lib/yuidoc.js", - "line": 340, + "line": 382, "description": "Timestamp holder so we know when YUIDoc started the parse process.", "itemtype": "property", "name": "starttime", @@ -2393,7 +2408,7 @@ }, { "file": "lib/yuidoc.js", - "line": 362, + "line": 404, "description": "Timestamp holder so we know when YUIDoc has finished the parse process.", "itemtype": "property", "name": "endtime", diff --git a/output/api/files/lib_builder.js.html b/output/api/files/lib_builder.js.html index 387222e4..2f5ca437 100644 --- a/output/api/files/lib_builder.js.html +++ b/output/api/files/lib_builder.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_cli.js.html b/output/api/files/lib_cli.js.html index 184ccac8..b4e0cf10 100644 --- a/output/api/files/lib_cli.js.html +++ b/output/api/files/lib_cli.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_docparser.js.html b/output/api/files/lib_docparser.js.html index 34eec4fe..ea486a29 100644 --- a/output/api/files/lib_docparser.js.html +++ b/output/api/files/lib_docparser.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    @@ -370,7 +370,7 @@

    File: lib/docparser.js

    // extract the first word, this is the param name match = REGEX_FIRSTWORD.exec(desc); if (match) { - name = trim(match[1]); + name = trim(explodeString(match[1])); desc = trim(match[2]); } @@ -493,7 +493,7 @@

    File: lib/docparser.js

    } result = { - description: explodeString(desc) + description: Y.unindent(explodeString(desc)) }; if (type) { diff --git a/output/api/files/lib_docview.js.html b/output/api/files/lib_docview.js.html index 1a46b975..9596a7e5 100644 --- a/output/api/files/lib_docview.js.html +++ b/output/api/files/lib_docview.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_files.js.html b/output/api/files/lib_files.js.html index dbf07c1d..e3aecf7f 100644 --- a/output/api/files/lib_files.js.html +++ b/output/api/files/lib_files.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_help.js.html b/output/api/files/lib_help.js.html index 646c3cd7..3ed9e5b0 100644 --- a/output/api/files/lib_help.js.html +++ b/output/api/files/lib_help.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_index.js.html b/output/api/files/lib_index.js.html index 58c6a217..427194e6 100644 --- a/output/api/files/lib_index.js.html +++ b/output/api/files/lib_index.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_options.js.html b/output/api/files/lib_options.js.html index 23854819..dd53ceb1 100644 --- a/output/api/files/lib_options.js.html +++ b/output/api/files/lib_options.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_server.js.html b/output/api/files/lib_server.js.html index ee31adbd..7b27a41b 100644 --- a/output/api/files/lib_server.js.html +++ b/output/api/files/lib_server.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_utils.js.html b/output/api/files/lib_utils.js.html index 0f4c1534..39241ced 100644 --- a/output/api/files/lib_utils.js.html +++ b/output/api/files/lib_utils.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/files/lib_yuidoc.js.html b/output/api/files/lib_yuidoc.js.html index 4a9294da..e3bf98b5 100644 --- a/output/api/files/lib_yuidoc.js.html +++ b/output/api/files/lib_yuidoc.js.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    @@ -355,8 +355,48 @@

    File: lib/yuidoc.js

    } }, + /** + * Applies preprocessors to the data tree. + * This function first clones the data and operates on the clone. + * @method runPreprocessors + * @private + * @return {Object} The mutated data + */ + runPreprocessors: function (data) { + var self = this, + preprocessors, + preprocessorsRelativeTo; + + // We will try to load the preprocessors as npm modules, but we will also + // search for them relative to the process working directory. + // The latter is consistent with how other paths are treated by yuidoc, + // such as the config options 'paths' and 'outdir'. + preprocessorsRelativeTo = process.cwd(); + + if (self.options.preprocessor) { + data=JSON.parse(JSON.stringify(data)); + + preprocessors = [].concat(self.options.preprocessor); + + preprocessors.forEach(function (preprocessor) { + var preprocessorModule; + + try { + preprocessorModule = require(preprocessor); + } catch (e) { + preprocessorModule = require(path.resolve(preprocessorsRelativeTo, preprocessor)); + } + + preprocessorModule(data, self.options); + }); + } + + return data; + }, + /** * Writes the parser JSON data to disk. + * Applies preprocessors, if any. * @method writeJSON * @param {Object} parser The DocParser instance to use * @private @@ -372,6 +412,8 @@

    File: lib/yuidoc.js

    data.warnings = parser.warnings; + data = this.runPreprocessors(data); + if (self.selleck && self.options.selleck && data.files && data.modules) { Object.keys(self.selleck).forEach(function (file) { Object.keys(data.files).forEach(function (f) { diff --git a/output/api/index.html b/output/api/index.html index f2f022ff..075804d1 100644 --- a/output/api/index.html +++ b/output/api/index.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/api/modules/yuidoc.html b/output/api/modules/yuidoc.html index b4712b5b..06888134 100644 --- a/output/api/modules/yuidoc.html +++ b/output/api/modules/yuidoc.html @@ -19,7 +19,7 @@

    - API Docs for: 0.3.49 + API Docs for: 0.3.50
    diff --git a/output/args/index.html b/output/args/index.html index 5b41d958..52be44ce 100644 --- a/output/args/index.html +++ b/output/args/index.html @@ -45,7 +45,7 @@

    Running YUIDoc on the Command Line

    YUI Doc generates API documentation from a modified JavaDoc syntax.
     
    -Current version (0.3.49)
    +Current version (0.3.50)
     
     Usage: yuidoc <options> <input path>