0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools/doc
Rich Trott fe1dcb5873 tools: remove unneeded escaping in generate.js
`-` does not need to be escaped in a regular expression outside of
character classes.

PR-URL: https://github.com/nodejs/node/pull/9781
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-11-27 10:23:31 -08:00
..
node_modules tools: update marked dependency 2016-05-07 09:27:05 +02:00
addon-verify.js test: enable addons test to pass with debug build 2016-10-06 10:27:30 -07:00
common.js tools: allow multiple added: version entries 2016-05-05 01:15:10 +02:00
generate.js tools: remove unneeded escaping in generate.js 2016-11-27 10:23:31 -08:00
html.js lib,tools: remove unneeded escaping of / 2016-11-23 22:06:24 -08:00
json.js lib,tools: remove unneeded escaping of / 2016-11-23 22:06:24 -08:00
LICENSE Mention marked, and add license to doc generator 2012-03-05 10:59:14 -08:00
package.json tools: update marked dependency 2016-05-07 09:27:05 +02:00
preprocess.js tools: make sure doctool anchors respect includes 2016-05-26 00:49:34 +02:00
README.md tools: enable more remark-lint rules 2016-09-25 13:02:45 +03:00
type-parser.js doc: revise http documentation 2016-10-11 09:54:39 -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.

### module.someNewFunction(x)
<!-- YAML
added: REPLACEME
-->

* `x` {String} the description of the string

This feature is not in a release yet.

### 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)