jsonnetdoc

command module
v0.0.0-...-2cdc547 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

jsonnetdoc

/!\ This is a fork from https://github.com/trotttrotttrott/jsonnetdoc that seem to be no longer maintained

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

go install github.com/AntoineThebaud/jsonnetdoc@master

Or clone the repo to build jsonnetdoc from source.

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 \
  AntoineThebaud/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