0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 23:43:09 +01:00
nodejs/tools/doc
Myles Borins 572e28efa2 tools: fix regression in doctool
101dd1e introduced a regression in the doctool. This commit reverts
the changes that were made to the function signature of the various
doctool functions while maintaining support for passing in specific
node versions.

Refs: https://github.com/nodejs/node/commit/101dd1e

PR-URL: https://github.com/nodejs/node/pull/6680
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Robert Lindstaedt <robert.lindstaedt@gmail.com>
2016-05-10 14:11:49 -07:00
..
node_modules tools: update marked dependency 2016-05-07 09:27:05 +02:00
addon-verify.js tools: fix tools/doc/addon-verify.js regression 2016-05-10 17:12:01 +02:00
common.js tools: allow multiple added: version entries 2016-05-05 01:15:10 +02:00
generate.js tools: fix regression in doctool 2016-05-10 14:11:49 -07:00
html.js tools: fix regression in doctool 2016-05-10 14:11:49 -07:00
json.js tools: update marked dependency 2016-05-07 09:27:05 +02:00
LICENSE
package.json tools: update marked dependency 2016-05-07 09:27:05 +02:00
preprocess.js doc: git mv to .md 2016-04-20 16:34:27 -07:00
README.md tools: parse documentation metadata 2016-05-05 01:15:10 +02:00
type-parser.js lib,test,tools: alignment on variable assignments 2016-04-18 17:19:11 -07:00

Here's how the node docs work.

1:1 relationship from lib/<module>.js to doc/api/<module>.md

Each type of heading has a description block.

## module
<!-- YAML
added: v0.10.0
-->

    Stability: 3 - Stable

description and examples.

### module.property
<!-- YAML
added: v0.10.0
-->

* Type

description of the property.

### module.someFunction(x, y, [z=100])
<!-- YAML
added: v0.10.0
-->

* `x` {String} the description of the string
* `y` {Boolean} Should I stay or should I go?
* `z` {Number} How many zebras to bring.

A description of the function.

### Event: 'blerg'
<!-- YAML
added: v0.10.0
-->

* Argument: SomeClass object.

Modules don't usually raise events on themselves.  `cluster` is the
only exception.

## Class: SomeClass
<!-- YAML
added: v0.10.0
-->

description of the class.

### Class Method: SomeClass.classMethod(anArg)
<!-- YAML
added: v0.10.0
-->

* `anArg` {Object}  Just an argument
  * `field` {String} anArg can have this field.
  * `field2` {Boolean}  Another field.  Default: `false`.
* Return: {Boolean} `true` if it worked.

Description of the method for humans.

### someClass.nextSibling()
<!-- YAML
added: v0.10.0
-->

* Return: {SomeClass object | null}  The next someClass in line.

### someClass.someProperty
<!-- YAML
added: v0.10.0
-->

* String

The indication of what someProperty is.

### Event: 'grelb'
<!-- YAML
added: v0.10.0
-->

* `isBlerg` {Boolean}

This event is emitted on instances of SomeClass, not on the module itself.
  • Modules have (description, Properties, Functions, Classes, Examples)
  • Properties have (type, description)
  • Functions have (list of arguments, description)
  • Classes have (description, Properties, Methods, Events)
  • Events have (list of arguments, description)
  • Methods have (list of arguments, description)
  • Properties have (type, description)