Skip to content

Commit e43c188

Browse files
committed
Updated README.md
1 parent 948203c commit e43c188

File tree

4 files changed

+87
-22
lines changed

4 files changed

+87
-22
lines changed

.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ test/
77
.travis.yml
88

99
Makefile
10+
11+
screenshot.png

README.md

Lines changed: 84 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# doxdox
22

3-
> JSDoc to Bootstrap and Markdown documentation generator.
3+
> JSDoc to Markdown, Bootstrap, and custom Handlebars template documentation generator.
44
55
[![Build Status](https://travis-ci.org/neogeek/doxdox.svg?branch=master)](https://travis-ci.org/neogeek/doxdox)
66
[![codecov](https://img.shields.io/codecov/c/github/neogeek/doxdox/master.svg)](https://codecov.io/gh/neogeek/doxdox)
@@ -10,37 +10,77 @@
1010
[![NPM Version](http://img.shields.io/npm/v/doxdox.svg?style=flat)](https://www.npmjs.org/package/doxdox)
1111
[![Latest Documentation](https://doxdox.org/images/badge-flat.svg)](https://doxdox.org/neogeek/doxdox)
1212

13-
## Installation
13+
**doxdox** is a simple to use documentation generator that takes JSDoc comment blocks and generates different documentation formats; Markdown, Bootstrap, and custom Handlebars templates.
14+
15+
**doxdox** also features support for extendability via custom plugins for both parsing and generating documentation.
16+
17+
**In**
18+
19+
```javascript
20+
/**
21+
* Parse array of directory globs and/or files, and then render the parsed data through the defined layout plugin.
22+
*
23+
* parseInputs(['src/*.js'], {'ignore': [], 'parser': 'dox', 'layout': 'markdown'}).then(content => {});
24+
*
25+
* @param {Array} inputs Array of directory globs and/or files.
26+
* @param {Object} config Configuration object.
27+
* @param {String} config.ignore Array of paths to ignore.
28+
* @param {String} config.parser String representing the parser to be used.
29+
* @param {String} config.layout String representing the layout plugin to be used.
30+
* @return {Object} Promise
31+
* @public
32+
*/
33+
```
34+
35+
**Out**
36+
37+
![screenshot](screenshot.png)
38+
39+
_Bootstrap template plugin_
40+
41+
## Getting Started
42+
43+
The following instructions assume you have already setup JSDoc comment blocks in your codebase. If you have not and would like to learn more about how to use JSDoc, visit <http://usejsdoc.org/>.
44+
45+
First install <b>doxdox</b> globally with NPM.
1446

1547
```bash
1648
$ npm install doxdox -g
1749
```
1850

19-
## Usage
20-
21-
### NPM Run Scripts
51+
Then, once you have **doxdox** installed globally (or local to your project, see below), you can start generating documentation. For this example, we will be generating a Markdown file and storing it within the project.
2252

23-
For more information on NPM run scripts visit <https://docs.npmjs.com/cli/run-script>.
53+
With a directory structure similar to the example shown below, run the following command to generate a Markdown file and output the generated contents to a new file named `DOCUMENTATION.md`.
2454

2555
```bash
26-
$ npm install doxdox --save-dev
56+
$ doxdox 'lib/**/*.js' --layout markdown --output DOCUMENTATION.md
2757
```
2858

29-
```json
30-
{
31-
"devDependencies": {
32-
"doxdox": "2.0.1"
33-
},
34-
"scripts": {
35-
"docs": "doxdox 'src/**/*.js' --layout markdown --output DOCUMENTATION.md"
36-
}
37-
}
3859
```
60+
├─ bin/
61+
├─ coverage/
62+
├─ lib/
63+
│ ├─ doxdox.js
64+
│ ├─ loaders.js
65+
│ ├─ utils.js
66+
├─ node_modules/
67+
└─ test/
68+
```
69+
70+
## Installation
71+
72+
**doxdox** can be installed via either NPM or Yarn.
3973

4074
```bash
41-
$ npm run docs
75+
$ npm install doxdox -g
76+
```
77+
78+
```bash
79+
$ yarn global add doxdox
4280
```
4381

82+
## Usage
83+
4484
### CLI
4585

4686
#### Layouts
@@ -49,23 +89,23 @@ _Markdown_
4989

5090
For more information on Markdown visit <http://daringfireball.net/projects/markdown/>.
5191

52-
```
92+
```bash
5393
$ doxdox 'src/**/*.js' --layout markdown --output DOCUMENTATION.md
5494
```
5595

5696
_Bootstrap_
5797

5898
Form more information on Bootstrap visit <https://v4-alpha.getbootstrap.com/>.
5999

60-
```
100+
```bash
61101
$ doxdox 'src/**/*.js' --layout bootstrap --output docs/index.html
62102
```
63103

64104
_Custom Handlebars Template_
65105

66106
For more information on writing Handlebars templates visit <http://handlebarsjs.com/>.
67107

68-
```
108+
```bash
69109
$ doxdox 'src/**/*.js' --layout templates/README.hbs --output README.md
70110
```
71111

@@ -102,7 +142,30 @@ Included Layouts:
102142
- Handlebars (http://handlebarsjs.com/)
103143
```
104144

105-
### API
145+
### NPM Run Scripts
146+
147+
For more information on NPM run scripts visit <https://docs.npmjs.com/cli/run-script>.
148+
149+
```bash
150+
$ npm install doxdox --save-dev
151+
```
152+
153+
```json
154+
{
155+
"devDependencies": {
156+
"doxdox": "2.0.1"
157+
},
158+
"scripts": {
159+
"docs": "doxdox 'src/**/*.js' --layout markdown --output DOCUMENTATION.md"
160+
}
161+
}
162+
```
163+
164+
```bash
165+
$ npm run docs
166+
```
167+
168+
### Via JavaScript
106169

107170
```javascript
108171
const doxdox = require('doxdox');

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "doxdox",
3-
"description": "JSDoc to Bootstrap and Markdown documentation generator.",
3+
"description": "JSDoc to Markdown, Bootstrap, and custom Handlebars template documentation generator.",
44
"version": "2.0.1",
55
"bin": {
66
"doxdox": "./bin/doxdox"

screenshot.png

203 KB
Loading

0 commit comments

Comments
 (0)