Skip to content

Commit 219fe25

Browse files
committed
fix(template): add correct path to partials
1 parent 8759b7c commit 219fe25

File tree

12 files changed

+40
-90
lines changed

12 files changed

+40
-90
lines changed

.github/workflows/now-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ jobs:
1717
- name: Deploy example to now
1818
run: |
1919
cd example
20+
npm run docs
2021
npx now --token=${{ secrets.ZEIT_TOKEN }} --name=vuepress-jsdoc-example --prod

cmds/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ async function generate(argv) {
111111
source: fileData,
112112
configure: configPath,
113113
partial: [
114-
path.resolve(__dirname, './template/header.hbs'),
115-
path.resolve(__dirname, './template/main.hbs')
114+
path.resolve(__filename, '../../template/header.hbs'),
115+
path.resolve(__filename, '../../template/main.hbs')
116116
]
117117
});
118118
} catch (e) {

example/documentation/code/class-constructor.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,27 @@ title: Classes
2020

2121
<a name="firstClass"></a>
2222

23-
## firstClass
24-
firstClass (no annotation needed)
23+
## firstClassfirstClass (no annotation needed)
2524

2625
**Kind**: global class
2726
<a name="secondClass"></a>
2827

29-
## secondClass
30-
**Kind**: global class
28+
## secondClass**Kind**: global class
3129
<a name="new_secondClass_new"></a>
3230

33-
### new secondClass()
34-
secondClass
31+
### new secondClass()secondClass
3532

3633
<a name="thirdClass"></a>
3734

38-
## thirdClass
39-
**Kind**: global class
35+
## thirdClass**Kind**: global class
4036
<a name="new_thirdClass_new"></a>
4137

42-
### new thirdClass()
43-
thirdClass
38+
### new thirdClass()thirdClass
4439

4540
<a name="fourthClass"></a>
4641

47-
## fourthClass
48-
**Kind**: global class
42+
## fourthClass**Kind**: global class
4943
<a name="new_fourthClass_new"></a>
5044

51-
### new fourthClass()
52-
fourthClass (no class annotation)
45+
### new fourthClass()fourthClass (no class annotation)
5346

example/documentation/code/class.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ test: test class
77

88
<a name="Test"></a>
99

10-
## Test
11-
**Kind**: global class
10+
## Test**Kind**: global class
1211

1312
* [Test](#Test)
1413
* [new Test()](#new_Test_new)
@@ -22,36 +21,30 @@ test: test class
2221

2322
<a name="new_Test_new"></a>
2423

25-
### new Test()
26-
This is a test class
24+
### new Test()This is a test class
2725

2826
<a name="Test+name"></a>
2927

30-
### test.name
31-
Set current name
28+
### test.nameSet current name
3229

3330
**Kind**: instance property of [<code>Test</code>](#Test)
3431
<a name="Test+name"></a>
3532

36-
### test.name
37-
Get current name
33+
### test.nameGet current name
3834

3935
**Kind**: instance property of [<code>Test</code>](#Test)
4036
<a name="Test+generateFullName"></a>
4137

42-
### test.generateFullName() ⇒
43-
Generate a fullname
38+
### test.generateFullName() ⇒Generate a fullname
4439

4540
**Kind**: instance method of [<code>Test</code>](#Test)
4641
**Returns**: an string
4742
<a name="Test.Test"></a>
4843

49-
### Test.Test
50-
**Kind**: static class of [<code>Test</code>](#Test)
44+
### Test.Test**Kind**: static class of [<code>Test</code>](#Test)
5145
<a name="new_Test.Test_new"></a>
5246

53-
#### new Test([name])
54-
Creates an instance of Test.
47+
#### new Test([name])Creates an instance of Test.
5548

5649

5750
| Param | Type | Default |

example/documentation/code/config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ exports.fileTree = [
2121
]
2222
},
2323
{ name: 'test', path: '/test', fullPath: './documentation/code/test' },
24-
{ name: 'tests', children: [{ name: 'first.test', path: '/first.test', fullPath: 'tests/first.test' }] }
24+
{ name: 'tests', children: [] }
2525
];
2626
exports.sidebarTree = (title = 'Mainpage') => ({
2727
'/code/': [
@@ -31,7 +31,6 @@ exports.sidebarTree = (title = 'Mainpage') => ({
3131
children: [['', '' + title + ''], 'class-constructor', 'class', 'methods', 'objects', 'test']
3232
},
3333
{ title: 'lib', collapsable: false, children: ['lib/dmd-options', 'lib/jsdoc-to-markdown'] },
34-
{ title: 'subfolder', collapsable: false, children: ['subfolder/subfolder.1/variables', 'subfolder/variables'] },
35-
{ title: 'tests', collapsable: false, children: ['tests/first.test'] }
34+
{ title: 'subfolder', collapsable: false, children: ['subfolder/subfolder.1/variables', 'subfolder/variables'] }
3635
]
3736
});

example/documentation/code/lib/dmd-options.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ title: dmd-options
66

77
<a name="DmdOptions"></a>
88

9-
## DmdOptions
10-
**Kind**: global class
9+
## DmdOptions**Kind**: global class

example/documentation/code/lib/jsdoc-to-markdown.md

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ title: jsdoc-to-markdown
66

77
<a name="module_jsdoc-to-markdown"></a>
88

9-
## jsdoc-to-markdown
10-
**Example**
9+
## jsdoc-to-markdown**Example**
1110
```js
1211
const jsdoc2md = require('jsdoc-to-markdown')
1312
```
@@ -27,12 +26,10 @@ const jsdoc2md = require('jsdoc-to-markdown')
2726

2827
<a name="exp_module_jsdoc-to-markdown--JsdocToMarkdown"></a>
2928

30-
### JsdocToMarkdown ⏏
31-
**Kind**: Exported class
29+
### JsdocToMarkdown ⏏**Kind**: Exported class
3230
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+render"></a>
3331

34-
#### jsdoc2md.render([options]) ⇒ <code>Promise</code>
35-
Returns markdown documentation from jsdoc-annoted source code.
32+
#### jsdoc2md.render([options]) ⇒ <code>Promise</code>Returns markdown documentation from jsdoc-annoted source code.
3633

3734
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
3835
**Category**: async
@@ -64,8 +61,7 @@ Pass in filepaths (`**` glob matching supported) of javascript source files:
6461
```
6562
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+getTemplateData"></a>
6663

67-
#### jsdoc2md.getTemplateData([options]) ⇒ <code>Promise</code>
68-
Returns the template data (jsdoc-parse output) which is fed into the output template (dmd).
64+
#### jsdoc2md.getTemplateData([options]) ⇒ <code>Promise</code>Returns the template data (jsdoc-parse output) which is fed into the output template (dmd).
6965

7066
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
7167
**Category**: async
@@ -77,8 +73,7 @@ Returns the template data (jsdoc-parse output) which is fed into the output temp
7773

7874
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+getJsdocData"></a>
7975

80-
#### jsdoc2md.getJsdocData([options]) ⇒ <code>Promise</code>
81-
Returns raw data direct from the underlying [jsdoc3](https://github.com/jsdoc3/jsdoc).
76+
#### jsdoc2md.getJsdocData([options]) ⇒ <code>Promise</code>Returns raw data direct from the underlying [jsdoc3](https://github.com/jsdoc3/jsdoc).
8277

8378
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
8479
**Category**: async
@@ -94,15 +89,13 @@ Returns raw data direct from the underlying [jsdoc3](https://github.com/jsdoc3/j
9489

9590
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+clear"></a>
9691

97-
#### jsdoc2md.clear() ⇒ <code>Promise</code>
98-
By default, the output of each invocation of the main generation methods (`render`, `getTemplateData` etc) is stored in the cache (your system's [temporary directory](https://nodejs.org/dist/latest-v6.x/docs/api/os.html#os_os_tmpdir)). Future jsdoc2md invocations with the same input options and source code will return the output immediately from cache, making the tool much faster/cheaper. If the input options or source code changes, fresh output will be generated. This method clears the cache, which you should never need to do unless the cache is failing for some reason. On Mac OSX, the system tmpdir clears itself every few days meaning your jsdoc2md cache will also be routinely cleared.
92+
#### jsdoc2md.clear() ⇒ <code>Promise</code>By default, the output of each invocation of the main generation methods (`render`, `getTemplateData` etc) is stored in the cache (your system's [temporary directory](https://nodejs.org/dist/latest-v6.x/docs/api/os.html#os_os_tmpdir)). Future jsdoc2md invocations with the same input options and source code will return the output immediately from cache, making the tool much faster/cheaper. If the input options or source code changes, fresh output will be generated. This method clears the cache, which you should never need to do unless the cache is failing for some reason. On Mac OSX, the system tmpdir clears itself every few days meaning your jsdoc2md cache will also be routinely cleared.
9993

10094
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
10195
**Category**: async
10296
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+getNamepaths"></a>
10397

104-
#### jsdoc2md.getNamepaths(options) ⇒ <code>object</code>
105-
Returns all [jsdoc namepaths](http://usejsdoc.org/about-namepaths.html) found in the supplied source code.
98+
#### jsdoc2md.getNamepaths(options) ⇒ <code>object</code>Returns all [jsdoc namepaths](http://usejsdoc.org/about-namepaths.html) found in the supplied source code.
10699

107100
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
108101
**Category**: async
@@ -113,8 +106,7 @@ Returns all [jsdoc namepaths](http://usejsdoc.org/about-namepaths.html) found in
113106

114107
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+renderSync"></a>
115108

116-
#### jsdoc2md.renderSync([options]) ⇒ <code>string</code>
117-
Sync version of [render](#module_jsdoc-to-markdown--JsdocToMarkdown+render).
109+
#### jsdoc2md.renderSync([options]) ⇒ <code>string</code>Sync version of [render](#module_jsdoc-to-markdown--JsdocToMarkdown+render).
118110

119111
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
120112
**Category**: sync
@@ -130,8 +122,7 @@ const docs = jsdoc2md.renderSync({ files: 'lib/*.js' })
130122
```
131123
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+getTemplateDataSync"></a>
132124

133-
#### jsdoc2md.getTemplateDataSync([options]) ⇒ <code>Array.&lt;object&gt;</code>
134-
Sync version of [getTemplateData](#module_jsdoc-to-markdown--JsdocToMarkdown+getTemplateData).
125+
#### jsdoc2md.getTemplateDataSync([options]) ⇒ <code>Array.&lt;object&gt;</code>Sync version of [getTemplateData](#module_jsdoc-to-markdown--JsdocToMarkdown+getTemplateData).
135126

136127
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
137128
**Category**: sync
@@ -142,8 +133,7 @@ Sync version of [getTemplateData](#module_jsdoc-to-markdown--JsdocToMarkdown+get
142133

143134
<a name="module_jsdoc-to-markdown--JsdocToMarkdown+getJsdocDataSync"></a>
144135

145-
#### jsdoc2md.getJsdocDataSync([options]) ⇒ <code>Array.&lt;object&gt;</code>
146-
Sync version of [getJsdocData](#module_jsdoc-to-markdown--JsdocToMarkdown+getJsdocData).
136+
#### jsdoc2md.getJsdocDataSync([options]) ⇒ <code>Array.&lt;object&gt;</code>Sync version of [getJsdocData](#module_jsdoc-to-markdown--JsdocToMarkdown+getJsdocData).
147137

148138
**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
149139
**Category**: sync

example/documentation/code/methods.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,13 @@ headline: Custom Title!
1818

1919
<a name="ES6Method"></a>
2020

21-
## ES6Method() ⇒
22-
A normal ES6 Method
21+
## ES6Method() ⇒A normal ES6 Method
2322

2423
**Kind**: global function
2524
**Returns**: a String
2625
<a name="standardMethod"></a>
2726

28-
## standardMethod() ⇒
29-
A normal standard Method
27+
## standardMethod() ⇒A normal standard Method
3028

3129
**Kind**: global function
3230
**Returns**: a String

example/documentation/code/objects.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ title: objects
66

77
<a name="obj"></a>
88

9-
## obj
10-
Object description
9+
## objObject description
1110

1211
**Kind**: global constant
1312

@@ -18,14 +17,12 @@ Object description
1817

1918
<a name="obj.name"></a>
2019

21-
### obj.name
22-
name
20+
### obj.namename
2321

2422
**Kind**: static property of [<code>obj</code>](#obj)
2523
<a name="obj.objMethod"></a>
2624

27-
### obj.objMethod(parameter) ⇒
28-
A function with a parameter and returns the name
25+
### obj.objMethod(parameter) ⇒A function with a parameter and returns the name
2926

3027
**Kind**: static method of [<code>obj</code>](#obj)
3128
**Returns**: this.name
@@ -36,7 +33,6 @@ A function with a parameter and returns the name
3633

3734
<a name="obj.objMethodTwo"></a>
3835

39-
### obj.objMethodTwo()
40-
Old way to write methods in objects
36+
### obj.objMethodTwo()Old way to write methods in objects
4137

4238
**Kind**: static method of [<code>obj</code>](#obj)

example/documentation/code/subfolder/subfolder.1/variables.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,11 @@ title: variables
2222

2323
<a name="normalLetVariable"></a>
2424

25-
## normalLetVariable
26-
A normal let variable
25+
## normalLetVariableA normal let variable
2726

2827
**Kind**: global variable
2928
<a name="MY_CONST_VAR"></a>
3029

31-
## MY\_CONST\_VAR
32-
Symbol constant
30+
## MY\_CONST\_VARSymbol constant
3331

3432
**Kind**: global constant

0 commit comments

Comments
 (0)