Skip to content

Commit

Permalink
fix(template): add correct path to partials
Browse files Browse the repository at this point in the history
  • Loading branch information
ph1p committed Dec 3, 2019
1 parent 8759b7c commit 219fe25
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 90 deletions.
1 change: 1 addition & 0 deletions .github/workflows/now-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ jobs:
- name: Deploy example to now
run: |
cd example
npm run docs
npx now --token=${{ secrets.ZEIT_TOKEN }} --name=vuepress-jsdoc-example --prod
4 changes: 2 additions & 2 deletions cmds/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ async function generate(argv) {
source: fileData,
configure: configPath,
partial: [
path.resolve(__dirname, './template/header.hbs'),
path.resolve(__dirname, './template/main.hbs')
path.resolve(__filename, '../../template/header.hbs'),
path.resolve(__filename, '../../template/main.hbs')
]
});
} catch (e) {
Expand Down
21 changes: 7 additions & 14 deletions example/documentation/code/class-constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,27 @@ title: Classes

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

## firstClass
firstClass (no annotation needed)
## firstClassfirstClass (no annotation needed)

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

## secondClass
**Kind**: global class
## secondClass**Kind**: global class
<a name="new_secondClass_new"></a>

### new secondClass()
secondClass
### new secondClass()secondClass

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

## thirdClass
**Kind**: global class
## thirdClass**Kind**: global class
<a name="new_thirdClass_new"></a>

### new thirdClass()
thirdClass
### new thirdClass()thirdClass

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

## fourthClass
**Kind**: global class
## fourthClass**Kind**: global class
<a name="new_fourthClass_new"></a>

### new fourthClass()
fourthClass (no class annotation)
### new fourthClass()fourthClass (no class annotation)

21 changes: 7 additions & 14 deletions example/documentation/code/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ test: test class

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

## Test
**Kind**: global class
## Test**Kind**: global class

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

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

### new Test()
This is a test class
### new Test()This is a test class

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

### test.name
Set current name
### test.nameSet current name

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

### test.name
Get current name
### test.nameGet current name

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

### test.generateFullName() ⇒
Generate a fullname
### test.generateFullName() ⇒Generate a fullname

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

### Test.Test
**Kind**: static class of [<code>Test</code>](#Test)
### Test.Test**Kind**: static class of [<code>Test</code>](#Test)
<a name="new_Test.Test_new"></a>

#### new Test([name])
Creates an instance of Test.
#### new Test([name])Creates an instance of Test.


| Param | Type | Default |
Expand Down
5 changes: 2 additions & 3 deletions example/documentation/code/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ exports.fileTree = [
]
},
{ name: 'test', path: '/test', fullPath: './documentation/code/test' },
{ name: 'tests', children: [{ name: 'first.test', path: '/first.test', fullPath: 'tests/first.test' }] }
{ name: 'tests', children: [] }
];
exports.sidebarTree = (title = 'Mainpage') => ({
'/code/': [
Expand All @@ -31,7 +31,6 @@ exports.sidebarTree = (title = 'Mainpage') => ({
children: [['', '' + title + ''], 'class-constructor', 'class', 'methods', 'objects', 'test']
},
{ title: 'lib', collapsable: false, children: ['lib/dmd-options', 'lib/jsdoc-to-markdown'] },
{ title: 'subfolder', collapsable: false, children: ['subfolder/subfolder.1/variables', 'subfolder/variables'] },
{ title: 'tests', collapsable: false, children: ['tests/first.test'] }
{ title: 'subfolder', collapsable: false, children: ['subfolder/subfolder.1/variables', 'subfolder/variables'] }
]
});
3 changes: 1 addition & 2 deletions example/documentation/code/lib/dmd-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ title: dmd-options

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

## DmdOptions
**Kind**: global class
## DmdOptions**Kind**: global class
30 changes: 10 additions & 20 deletions example/documentation/code/lib/jsdoc-to-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ title: jsdoc-to-markdown

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

## jsdoc-to-markdown
**Example**
## jsdoc-to-markdown**Example**
```js
const jsdoc2md = require('jsdoc-to-markdown')
```
Expand All @@ -27,12 +26,10 @@ const jsdoc2md = require('jsdoc-to-markdown')

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

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

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

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

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

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

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

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

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

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

#### 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.
#### 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.

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

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

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

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

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

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

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

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

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

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

**Kind**: instance method of [<code>JsdocToMarkdown</code>](#exp_module_jsdoc-to-markdown--JsdocToMarkdown)
**Category**: sync
Expand Down
6 changes: 2 additions & 4 deletions example/documentation/code/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ headline: Custom Title!

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

## ES6Method() ⇒
A normal ES6 Method
## ES6Method() ⇒A normal ES6 Method

**Kind**: global function
**Returns**: a String
<a name="standardMethod"></a>

## standardMethod() ⇒
A normal standard Method
## standardMethod() ⇒A normal standard Method

**Kind**: global function
**Returns**: a String
12 changes: 4 additions & 8 deletions example/documentation/code/objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ title: objects

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

## obj
Object description
## objObject description

**Kind**: global constant

Expand All @@ -18,14 +17,12 @@ Object description

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

### obj.name
name
### obj.namename

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

### obj.objMethod(parameter) ⇒
A function with a parameter and returns the name
### obj.objMethod(parameter) ⇒A function with a parameter and returns the name

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

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

### obj.objMethodTwo()
Old way to write methods in objects
### obj.objMethodTwo()Old way to write methods in objects

**Kind**: static method of [<code>obj</code>](#obj)
6 changes: 2 additions & 4 deletions example/documentation/code/subfolder/subfolder.1/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ title: variables

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

## normalLetVariable
A normal let variable
## normalLetVariableA normal let variable

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

## MY\_CONST\_VAR
Symbol constant
## MY\_CONST\_VARSymbol constant

**Kind**: global constant
6 changes: 2 additions & 4 deletions example/documentation/code/subfolder/variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ title: variables

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

## normalLetVariable
A normal let variable
## normalLetVariableA normal let variable

**Kind**: global variable
<a name="SUBFOLDER"></a>

## SUBFOLDER
A constant
## SUBFOLDERA constant

**Kind**: global constant
15 changes: 0 additions & 15 deletions example/documentation/code/tests/first.test.md

This file was deleted.

0 comments on commit 219fe25

Please sign in to comment.