1.1.0 • Published 6 years ago
sh-to-markdown v1.1.0
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
Param | Type | Description |
---|---|---|
semver | string | Semantic Version of Docker image, ex. 1.0.0-rc2 |
timeout | number | Timeout period between retries |
Credit
dmd
jsdoc
jsdoc-api
jsdoc-parse