https://github.com/devtin/dmd-readme
https://github.com/devtin/dmd-readme
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devtin/dmd-readme
- Owner: devtin
- Created: 2020-07-16T00:49:24.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T04:09:50.000Z (about 4 years ago)
- Last Synced: 2025-08-09T04:43:57.893Z (8 months ago)
- Language: JavaScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
dmd-readme
A plugin for clean readme docs
## Installation
```sh
$ npm i dmd-readme --save
# or
$ yarn add dmd-readme
```
### Usage
**Description:**
Pass the plug-in name to `jsdoc2md` or `dmd`:
```
jsdoc2md --plugin dmd-readme
```
This plugin is initially a fork from dmd-readable, which:
- removes global indexes
- places descriptions in block-quotes
- adds more whitespace before headings
- changes the delimiter for multiple types in param tables to a comma
- adds alias output
### config(path) ⇒ \*
| Param | Type | Description |
| --- | --- | --- |
| path | string | The config path |
**Description:**
Grabs configuration options
### features()
**Description:**
Loads AVA test files located `config.features`
### pkg(key) ⇒ \*
**See**: [docs.hbs](docs.hbs) for an example of how to use this function
| Param | Type | Description |
| --- | --- | --- |
| key | string | The package property you want returned |
**Description:**
Reads info from the package.json file.
### prefixLines(string, replacer) ⇒ string
| Param | Type | Description |
| --- | --- | --- |
| string | string | The string to modify |
| replacer | string | The string to prefix to each line |
**Description:**
Prefixes a string to the beginning of each line in the first string
### stripJsdocComment(jsDocCommentBlock, replaceValue) ⇒ String
| Param | Type | Description |
| --- | --- | --- |
| jsDocCommentBlock | String | |
| replaceValue | String | Value with to replace comment blocks |
**Returns**: String - The comment without the asterisks
**Description:**
Removes all asterisks and additional white spaces from JSDoc comments
**Example**
```js
const jsDocSyntax = `/**
* A JSDoc description
*
* Hello
**\/`
// => Outputs:
// A JSDoc description
//
// Hello
```
### jsCodeToMd(jsCode) ⇒ string
| Param | Type |
| --- | --- |
| jsCode | String |
**Description:**
Converts given `jsCode` into markdown by stripping jsDoc comments
* * *
### License
[MIT](https://opensource.org/licenses/MIT)
© 2020-present Martin Rafael Gonzalez tin@devtin.io