0.2.0 • Published 3 years ago

@dashkite/writeme v0.2.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
3 years ago

WriteMe

Generate Markdown reference documentation from metadata using JavaScript.

import { compile } from "@dashkite/writeme"
import YAML from "js-yaml"

assert /^# Push/.test marked compile YAML.load """
  name: push
  type: function
  description: Push an item onto the stack.
  signatures:
  - arguments:
    - name: stack
			type: Stack
			description: A stack.
    - name: item
      description: The item to push onto the stack.
    returns:
      name: stack
      type: Stack
      description: A new stack with _item_ pushed onto it.
"""

Generates a document that will render to HTML something like this:

Push

Function

push stack, item → stack

nametypedescription
stackStackA stack.
itemanyThe item to push onto the stack.
→ stackStackA new stack with item pushed onto it

Push an item onto the stack.

Links are resolved using an optional index. You can generate an index using index, optionally passing it an index to update.

import { index } from "@dashkite/writeme"
import YAML from "js-yaml"

assert (index name: "foo", "./foo.md")["foo"] == "./foo.md"

Features

  • Functions
  • Classes: coming soon
  • Methods: coming soon

Install

npm i -D @dashkite/writeme

Reference

API

compile

compile yaml → markdown

Compiles the given YAML specification into Markdown.

Schema

Function

Coming soon.

Class

Coming soon.

Method

Coming soon.

0.2.0

3 years ago

0.1.0

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago