Skip to content

Commit dfd137a

Browse files
typos in readme
1 parent 029c162 commit dfd137a

File tree

5 files changed

+29
-17
lines changed

5 files changed

+29
-17
lines changed

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./readme

README.md

+26-15
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
# better-docs
22

3-
Beautiful and simple documentation template for JSDoc 3 with @category plugin.
4-
5-
<img src="./readme/class.png" />
6-
<img src="./readme/with-mermaid.png" />
3+
Beautiful and simple documentation template for JSDoc 3 with **@category** and **@component** plugins:
4+
5+
<table>
6+
<tr>
7+
<td style="width: 30%">
8+
<a href='./readme/class.png'><img src="./readme/class.png" /></a>
9+
</td>
10+
<td style="width: 30%">
11+
<a href='./readme/with-mermaid.png'><img src="./readme/with-mermaid.png" /></a>
12+
</td>
13+
<td style="width: 30%">
14+
<a href='./readme/component.png'><img src="./readme/component.png" /></a>
15+
</td>
16+
</tr>
17+
</table>
718

819
## Example
920

10-
Simple example documentation can be found here: https://softwarebrothers.github.io/admin-bro-dev/index.html
21+
Example documentation can be found here: https://softwarebrothers.github.io/admin-bro-dev/index.html
1122

1223
## Installation
1324

@@ -19,7 +30,7 @@ npm install --save-dev better-docs
1930

2031
### With command line
2132

22-
Assuming that you have jsdoc installed globally:
33+
Assuming that you have [jsdoc](https://github.com/jsdoc/jsdoc) installed globally:
2334

2435
```
2536
jsdoc your-documented-file.js -t ./node_modules/better-docs
@@ -31,7 +42,7 @@ In your projects package.json file - add a new script:
3142

3243
```
3344
"script": {
34-
"docs": "node_modules/.bin/jsdoc -c jsdoc.json"
45+
"docs": "jsdoc -c jsdoc.json"
3546
}
3647
```
3748

@@ -107,7 +118,7 @@ yarn global add parcel-bundler
107118

108119
To document components simply add `@component` in your JSDoc documentation:
109120

110-
```
121+
```jsx
111122
/**
112123
* Some documented component
113124
*
@@ -155,15 +166,15 @@ export default {
155166
</script>
156167
```
157168

158-
Here props will be taken from `props` property.
169+
In this case, props will be taken from `props` property.
159170

160171
### Preview
161172

162173
`@component` plugin also modifies the behaviour of `@example` tag in a way that it can generate an actual __component preview__. What you have to do is to add an `@example` tag and return component from it:
163174

164175
**React example:**
165176

166-
```javacript
177+
```jsx
167178
/**
168179
* Some documented component
169180
*
@@ -181,7 +192,7 @@ const Documented = (props) => {
181192

182193
**Vue example 1:**
183194

184-
```
195+
```vue
185196
<script>
186197
/**
187198
* @component
@@ -197,7 +208,7 @@ export default {
197208

198209
**Vue example 2:**
199210

200-
```
211+
```vue
201212
<script>
202213
/**
203214
* @component
@@ -219,7 +230,7 @@ export default {
219230
</script>
220231
```
221232

222-
You can put as many `@example` tags as you like in one component and name each of them like this:
233+
You can put as many `@example` tags as you like in one component and "caption" each of them like this:
223234

224235
```javascript
225236
/**
@@ -310,7 +321,7 @@ export default Component
310321

311322
### Styling React examples
312323

313-
Better-docs inserts all examples within an `iframe`. This results in following styling options:
324+
Better-docs inserts all examples within an `iframe`. This results in the following styling options:
314325

315326
1. If you pass styles inline - they will work right away.
316327

@@ -487,7 +498,7 @@ If you want to see how to setup jsdoc in your project - take a look at these bri
487498

488499
## License
489500

490-
better-docs is Copyright © 2019 SoftwareBrothers.co. It is free software and may be redistributed under the terms specified in the [LICENSE](LICENSE) file.
501+
better-docs is Copyright © 2019 SoftwareBrothers.co. It is free software and may be redistributed under the terms specified in the [LICENSE](LICENSE) file - MIT.
491502

492503
## About SoftwareBrothers.co
493504

readme/component.png

121 KB
Loading

tmpl/container.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<?js }) ?>
4141
<?js } else if (doc.component) { ?>
4242
<h2>
43-
<?js= '&lt' + doc.name + ' ' + doc.component.props.map(p => '<i>' + p.name + '</i>').join(', ') + ' /&gt' ?>
43+
<?js= '&lt' + doc.name + ' ' + doc.component.props.map(p => '<i>' + p.name + '</i>').join(' ') + ' /&gt' ?>
4444
</h2>
4545
<?js } ?>
4646
</header>

tmpl/method.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var self = this;
1818
<?js } ?>
1919
<span class="code-name">
2020
<?js if (data.component) { ?>
21-
<?js= '&lt' + name + ' ' + data.component.props.map(p => '<i>' + p.name + '</i>').join(', ') + ' /&gt' ?>
21+
<?js= '&lt' + name + ' ' + data.component.props.map(p => '<i>' + p.name + '</i>').join(' ') + ' /&gt' ?>
2222
<?js } else { ?>
2323
<?js= (kind === 'class' ? 'new ' : '') + name + (data.signature || '') ?>
2424
<?js } ?>

0 commit comments

Comments
 (0)