https://github.com/caub/mongoose-docgen
Documentation generator for mongoose
https://github.com/caub/mongoose-docgen
Last synced: 3 months ago
JSON representation
Documentation generator for mongoose
- Host: GitHub
- URL: https://github.com/caub/mongoose-docgen
- Owner: caub
- Created: 2019-04-12T16:59:35.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-01T22:04:54.000Z (about 7 years ago)
- Last Synced: 2025-06-08T22:05:09.424Z (about 1 year ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mongoose Documentation Generation
Generates documentation in Markdown or HTML from Mongoose model files
Usage:
```sh
npx mongoose-docgen [filePath].js > [filePath].md
```
### Convert Markdown to Html
You can convert the generated Markdown files to HTML files using for example [markdown-it](http://npm.im/markdown-it) and any relevant CSS, for example:
```css
body {
font-family: Arial;
color: rgba(0, 0, 0, 0.87);
}
h1, h2 {
border-bottom: 1px solid #ccc;
}
h1 > a {
text-decoration: none;
margin-right: 1rem;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}
pre {
background-color: #f9f2f4;
padding: 2px 4px;
border-radius: 4px;
}
strong > code {
font-size: 110%;
}
p {
line-height: 1.2em;
margin-block-start: .5em;
margin-block-end: .5em;
}
li {
margin-block-start: .5em;
margin-block-end: .5em;
}
```