etherpad-lite/bin/doc
muxator db77302883 doc: remove old vendorized marked module and replace with 0.8.2
This change is needed because in 1.8.3 we are going to introduce Markdown tables
in the documentation (#3873 and #3921), and the old marked version did not
support generating them.

Instead of committing the marked source code here, we live install from npm if
needed via the Makefile.

n.b.: at the time of this change, marked latest version is 1.0.0, released a few
      days ago. I am updating to the version immediately before that (0.8.2),
      because in 1.0.0 the hyperlinks in the Table of Contents do not work
      (probably a bug in that version).
2020-04-24 02:24:53 +02:00
..
generate.js formatting: bulk remove trailing whitespaces 2019-10-20 02:09:22 +02:00
html.js move docs 2014-12-24 02:45:21 +00:00
json.js Typos and minor fixes in bin, doc, and root 2017-09-14 13:33:27 +02:00
LICENSE move docs 2014-12-24 02:45:21 +00:00
package-lock.json doc: remove old vendorized marked module and replace with 0.8.2 2020-04-24 02:24:53 +02:00
package.json doc: remove old vendorized marked module and replace with 0.8.2 2020-04-24 02:24:53 +02:00
README.md wrong path of generate.js 2017-04-04 15:13:07 +08:00

Here's how the node docs work.

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)

CLI usage

Run the following from the etherpad-lite root directory:

$ node bin/doc/generate doc/index.md --format=html --template=doc/template.html > out.html