Skip to content

Commit 7f628ff

Browse files
committed
improvement(cli): show path of src file
update dependencies remove some example code
1 parent 73fd9f4 commit 7f628ff

File tree

9 files changed

+1617
-1870
lines changed

9 files changed

+1617
-1870
lines changed

cmds/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,15 @@ async function generate(argv) {
126126

127127
console.log(
128128
chalk.black.bgRed(isConfigExclude ? 'exclude by config' : 'error'),
129-
`${folderPath}/${fileName}.md`
129+
`${folder}/${file} -> ${folderPath}/${fileName}.md`
130130
);
131131
}
132132
}
133133

134134
if (mdFileData) {
135135
const { frontmatter, attributes } = parseVuepressComment(fileData);
136136

137-
console.log(chalk.black.bgGreen('write file'), `${folderPath}/${fileName}.md`);
137+
console.log(chalk.black.bgGreen('write file'), `${folder}/${file} -> ${folderPath}/${fileName}.md`);
138138

139139
let fileContent = '---\n';
140140

example/documentation/code/config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
exports.fileTree = [
2+
{ name: 'class', path: '/class', fullPath: './documentation/code/class' },
3+
{
4+
name: 'lib',
5+
children: [
6+
{ name: 'dmd-options', path: '/dmd-options', fullPath: 'lib/dmd-options' },
7+
{ name: 'jsdoc-to-markdown', path: '/jsdoc-to-markdown', fullPath: 'lib/jsdoc-to-markdown' }
8+
]
9+
},
10+
{ name: 'methods', path: '/methods', fullPath: './documentation/code/methods' },
11+
{ name: 'objects', path: '/objects', fullPath: './documentation/code/objects' },
12+
{
13+
name: 'subfolder',
14+
children: [
15+
{
16+
name: 'subfolder.1',
17+
children: [{ name: 'variables', path: '/variables', fullPath: 'subfolder/subfolder.1/variables' }]
18+
},
19+
{ name: 'variables', path: '/variables', fullPath: 'subfolder/variables' }
20+
]
21+
},
22+
{ name: 'test', path: '/test', fullPath: './documentation/code/test' },
23+
{ name: 'tests', children: [] }
24+
];
25+
exports.sidebarTree = (title = 'Mainpage') => ({
26+
'/code/': [
27+
{ title: 'API', collapsable: false, children: [['', '' + title + ''], 'class', 'methods', 'objects', 'test'] },
28+
{ title: 'lib', collapsable: false, children: ['lib/dmd-options', 'lib/jsdoc-to-markdown'] },
29+
{ title: 'subfolder', collapsable: false, children: ['subfolder/subfolder.1/variables', 'subfolder/variables'] }
30+
]
31+
});

example/documentation/code/objects.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: objects
3+
---
4+
5+
# objects
6+
7+
<a name="obj"></a>
8+
9+
## obj
10+
Object description
11+
12+
**Kind**: global constant
13+
14+
* [obj](#obj)
15+
* [.name](#obj.name)
16+
* [.objMethod(parameter)](#obj.objMethod)
17+
* [.objMethodTwo()](#obj.objMethodTwo)
18+
19+
<a name="obj.name"></a>
20+
21+
### obj.name
22+
name
23+
24+
**Kind**: static property of [<code>obj</code>](#obj)
25+
<a name="obj.objMethod"></a>
26+
27+
### obj.objMethod(parameter) ⇒
28+
A function with a parameter and returns the name
29+
30+
**Kind**: static method of [<code>obj</code>](#obj)
31+
**Returns**: this.name
32+
33+
| Param | Type |
34+
| --- | --- |
35+
| parameter | <code>any</code> |
36+
37+
<a name="obj.objMethodTwo"></a>
38+
39+
### obj.objMethodTwo()
40+
Old way to write methods in objects
41+
42+
**Kind**: static method of [<code>obj</code>](#obj)
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: variables
3+
---
4+
5+
# variables
6+
7+
## Members
8+
9+
<dl>
10+
<dt><a href="#normalLetVariable">normalLetVariable</a></dt>
11+
<dd><p>A normal let variable</p>
12+
</dd>
13+
</dl>
14+
15+
## Constants
16+
17+
<dl>
18+
<dt><a href="#MY_CONST_VAR">MY_CONST_VAR</a></dt>
19+
<dd><p>Symbol constant</p>
20+
</dd>
21+
</dl>
22+
23+
<a name="normalLetVariable"></a>
24+
25+
## normalLetVariable
26+
A normal let variable
27+
28+
**Kind**: global variable
29+
<a name="MY_CONST_VAR"></a>
30+
31+
## MY\_CONST\_VAR
32+
Symbol constant
33+
34+
**Kind**: global constant
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: variables
3+
---
4+
5+
# variables
6+
7+
## Members
8+
9+
<dl>
10+
<dt><a href="#normalLetVariable">normalLetVariable</a></dt>
11+
<dd><p>A normal let variable</p>
12+
</dd>
13+
</dl>
14+
15+
## Constants
16+
17+
<dl>
18+
<dt><a href="#SUBFOLDER">SUBFOLDER</a></dt>
19+
<dd><p>A constant</p>
20+
</dd>
21+
</dl>
22+
23+
<a name="normalLetVariable"></a>
24+
25+
## normalLetVariable
26+
A normal let variable
27+
28+
**Kind**: global variable
29+
<a name="SUBFOLDER"></a>
30+
31+
## SUBFOLDER
32+
A constant
33+
34+
**Kind**: global constant

example/documentation/code/test.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: test
3+
---
4+
# test
5+
6+
## data
7+
8+
- `num`
9+
10+
**initial value:** `100`
11+
12+
## computed properties
13+
14+
- `testComputed`
15+
16+
**dependencies:** `num`
17+
18+
19+
## methods
20+
21+
- `getNumber(num)`
22+
23+
**parameters:**
24+
25+
- `num` **number** -
26+

example/src/test.vue

Lines changed: 9 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,139 +1,29 @@
11
<template>
2-
<div class="navigation">
3-
4-
</div>
2+
<div class="navigation"></div>
53
</template>
64

75
<script>
8-
import EndNavigationModal from './EndNavigationModal';
9-
import { Carousel, Slide } from 'vue-carousel';
10-
11-
/**
12-
* @vue
13-
*/
146
export default {
15-
components: {
16-
EndNavigationModal,
17-
Carousel,
18-
Slide
19-
},
207
data() {
218
return {
22-
isNavigationLocked: false
9+
num: 100
2310
};
2411
},
2512
computed: {
26-
isNavigationVisible() {
27-
return this.$store.getters.isNavigationVisible;
28-
},
29-
isEndNavigationModalVisible() {
30-
return this.$store.getters.isEndNavigationModalVisible;
31-
},
32-
activeSection() {
33-
return this.$store.getters.activeSection;
34-
},
35-
activeSubSection() {
36-
return this.$store.getters.activeSubSection;
37-
},
38-
sections() {
39-
return this.$sections;
40-
},
41-
sectionsWithoutProfiSubviews() {
42-
return this.$sectionsWithoutProfiSubviews;
13+
testComputed() {
14+
return this.num * 5;
4315
}
4416
},
4517
methods: {
46-
formatSubViewNumber(index) {
47-
return index < 9 ? `0${index + 1}` : index + 1;
48-
},
49-
calcProgressbarWidth() {
50-
const activeSectionWidth = this.sectionsWithoutProfiSubviews[this.activeSection].subviews.length;
51-
let barWidth = 18;
52-
if (activeSectionWidth < 10) {
53-
barWidth = 40;
54-
} else if (activeSectionWidth < 15) {
55-
barWidth = 30;
56-
}
57-
return barWidth;
58-
},
59-
resetActiveSubsection() {
60-
this.$store.dispatch(
61-
'setActiveSubSection',
62-
this.sectionsWithoutProfiSubviews[this.activeSection].subviews[0].meta.index
63-
);
64-
},
65-
resetNavigation() {
66-
this.toggleCloseNavigationModal();
67-
this.toggleNav();
68-
this.$router.push({
69-
path: '/'
70-
});
71-
},
72-
toggleNav() {
73-
if (!this.isNavigationLocked) {
74-
this.$store.dispatch('toggleIsNavigationVisible');
75-
}
76-
},
77-
toggleCloseNavigationModal() {
78-
if (!this.isNavigationLocked) {
79-
this.$store.dispatch('toggleIsEndNavigationModalVisible');
80-
}
81-
},
82-
/**
83-
* @param {Number} index Number of the section to display
84-
*/
85-
setActiveSection(index) {
86-
this.$store.dispatch('setActiveSection', index);
87-
this.$store.dispatch('setActiveSubSection', 0);
88-
},
89-
/**
90-
* @param {Number} index Number of the subsection to display
91-
*/
92-
setActiveSubSection(index) {
93-
this.$store.dispatch('setActiveSubSection', index);
94-
},
95-
/**
96-
* Navigate to the next subsection
97-
*/
98-
nextSubsection() {
99-
if (!this.isNavigationLocked) {
100-
if (this.activeSubSection < this.$sections[this.activeSection].subviews.length - 1) {
101-
this.$store.dispatch('setActiveSubSection', this.activeSubSection + 1);
102-
this.$router.push({
103-
path: `/${this.sections[this.activeSection].path}/${
104-
this.sections[this.activeSection].subviews[this.activeSubSection].path
105-
}`
106-
});
107-
} else {
108-
this.$router.push({
109-
path: '/pyramid'
110-
});
111-
}
112-
}
113-
},
11418
/**
115-
* Navigate to the prevoius subsection
19+
* @param {number} num -
11620
*/
117-
previousSubsection() {
118-
if (!this.isNavigationLocked) {
119-
if (this.activeSubSection > 0) {
120-
this.$store.dispatch('setActiveSubSection', this.activeSubSection - 1);
121-
this.$router.push({
122-
path: `/${this.sections[this.activeSection].path}/${
123-
this.sections[this.activeSection].subviews[this.activeSubSection].path
124-
}`
125-
});
126-
}
127-
}
21+
getNumber(num) {
22+
return num;
12823
}
12924
},
130-
created() {
131-
this.$root.$on('toggle-paintable-screen', isPainterActive => {
132-
this.isNavigationLocked = isPainterActive;
133-
});
134-
}
25+
created() {}
13526
};
13627
</script>
13728

138-
<style lang="scss" scoped>
139-
</style>
29+
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)