node/tools/doc
Robert Jefe Lindstaedt 0800c0aa72 doc: git mv to .md
* doc: rename .markdown references in content
* doc: rename to .md in tools
* doc: rename to .md in CONTRIBUTING.md

PR-URL: https://github.com/nodejs/node/pull/4747
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: techjeffharris
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-04-20 16:34:27 -07:00
..
node_modules doc: don't use &apos; 2012-09-04 21:15:39 +02:00
LICENSE Mention marked, and add license to doc generator 2012-03-05 10:59:14 -08:00
README.md doc: git mv to .md 2016-04-20 16:34:27 -07:00
addon-verify.js doc: git mv to .md 2016-04-20 16:34:27 -07:00
generate.js tools: apply linting to doc tools 2016-02-01 23:40:41 -08:00
html.js doc: git mv to .md 2016-04-20 16:34:27 -07:00
json.js tools,doc: fix json for grouped optional params 2016-04-09 18:40:26 +02:00
package.json New documentation generation tool 2012-02-29 15:15:25 -08:00
preprocess.js doc: git mv to .md 2016-04-20 16:34:27 -07:00
type-parser.js lib,test,tools: alignment on variable assignments 2016-04-18 17:19:11 -07:00

README.md

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

    Stability: 3 - Stable

description and examples.

### module.property

* Type

description of the property.

### module.someFunction(x, y, [z=100])

* `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'

* Argument: SomeClass object.

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

## Class: SomeClass

description of the class.

### Class Method: SomeClass.classMethod(anArg)

* `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()

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

### someClass.someProperty

* String

The indication of what someProperty is.

### Event: 'grelb'

* `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)