jsonnetdoc

command module
v0.0.0-...-ece56aa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

README

jsonnetdoc

Documentation parser for JSDoc style comments in Jsonnet.

This is not even close to covering the complete spec. Only descriptions, @name, @param, and @return. The initial motivation for this was Grafonnet which has used this documentation style for quite a while without something to parse it.

See testdata/ for documentation examples.

Installation

No release binaries are maintained at this time. but Docker images are: https://hub.docker.com/repository/docker/trotttrotttrott/jsonnetdoc. If you don't want to use Docker, clone the repo and use one of the usual Go installation methods like go install.

Usage

Expects a single argument which should be a path to your Jsonnet files. By default, it will output a JSON representation of your documentation. If you pass, the --markdown flag, it will instead output Markdown.

Usage:
  jsonnetdoc <input-file|dir> [flags]

Flags:
  -h, --help       help for jsonnetdoc
      --markdown   output markdown instead of JSON

Example:

jsonnetdoc testdata --markdown

Same command using Docker:

docker run --rm \
  -v $PWD:$PWD \
  -w $PWD \
  trotttrotttrott/jsonnetdoc \
  testdata --markdown

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL