etherpad-lite/src/bin/doc
dependabot[bot] 13330c45f8
build(deps): bump marked from 5.1.0 to 5.1.1 in /src/bin/doc (#5819)
Bumps [marked](https://github.com/markedjs/marked) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/markedjs/marked/releases)
- [Changelog](https://github.com/markedjs/marked/blob/master/.releaserc.json)
- [Commits](https://github.com/markedjs/marked/compare/v5.1.0...v5.1.1)

---
updated-dependencies:
- dependency-name: marked
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-07 19:18:39 +02:00
..
LICENSE restructure: move bin/ and tests/ to src/ 2021-02-04 17:15:08 -05:00
README.md restructure: Prefix `bin/` and `tests/` with `src/` 2021-02-05 21:52:08 +00:00
generate.js restructure: move bin/ and tests/ to src/ 2021-02-04 17:15:08 -05:00
html.js DOCS: Fix broken links in TOC - use Marked to generate ID slugs instead of local implementation that was giving out different IDs in some cases - https://github.com/citizenos/citizenos-fe/issues/535 2021-04-06 21:42:01 +02:00
json.js restructure: move bin/ and tests/ to src/ 2021-02-04 17:15:08 -05:00
package-lock.json build(deps): bump marked from 5.1.0 to 5.1.1 in /src/bin/doc (#5819) 2023-07-07 19:18:39 +02:00
package.json build(deps): bump marked from 5.1.0 to 5.1.1 in /src/bin/doc (#5819) 2023-07-07 19:18:39 +02:00

README.md

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 src/bin/doc/generate doc/index.md --format=html --template=doc/template.html > out.html