1.1.0 • Published 6 years ago

sh-to-markdown v1.1.0

Weekly downloads
9
License
ISC
Repository
github
Last release
6 years ago

sh-to-markdown

Overview

Existing bash script documentation tools are lackluster, so I created a documentation generation tool that allows you to document bash scripts with JSDoc, and generate beautiful markdown with it.

Formatting

Multi-line comments are detected as JSDoc comment blocks:

: '
@typedef myScript
@...
:

are interpreted in an identical fashion as JSDoc comments blocks:

/**
 * @typdef myScript
 * @...
 */

API

CLI

Example bash script:

deploy.sh

#!/bin/sh

: '
@typedef "deploy.sh"
@param {string} semver Semantic Version of Docker image, ex. 1.0.0-rc2
@param {number} timeout Timeout period between retries
:

buildImage (){ }

Generation

# sh2md deploy.sh > api.md

deploy.sh

Kind: global typedef

ParamTypeDescription
semverstringSemantic Version of Docker image, ex. 1.0.0-rc2
timeoutnumberTimeout period between retries

Credit

dmd
jsdoc
jsdoc-api
jsdoc-parse

1.1.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago