Comments (11)
@ferrinweb
Very weird behavior, are you writing this comment outside of the root element of the template? You try to write it inside the root element, this problem will not occur, this may be a problem with vue-template-compiler .
from vuese.
You need to know which one of the .vue files to handle is wrong and provide the contents of the file to me. There is no better way now, I am very sorry, then I will think about a better way to reproduce.
from vuese.
I also encountered the same problem, and in addition, in many pages, props, slots, methods, events can not be identified, resulting in the corresponding part of the generated document is empty.
from vuese.
Can you give me a reproduced source file? Can be sent to my email, I will provide an online recurring solution as soon as possible
from vuese.
Add one,but mine is a private project,just follow the issue.
from vuese.
I console.log something in vuese/dist/vuese.js, line 116:
comments.split('\n').forEach(c => {
if ((matchs = c.match(leadRE))) {
currentKey = matchs[1];
res[currentKey] = res[currentKey] || [];
console.log(currentKey, ' | ', res[currentKey])
res[currentKey].push(c.replace(leadRE, '').trim());
}
else {
res.default.push(c);
}
});
and then:
D:\www\APP_BASE_TEMPLATE>vuese gen --include="src/components/*.vue"
? Select the target to generate Docute - The fastest way to create a documentation site for your project.
∞ Start creating markdown files...
param | []
param | [ 'x String X轴坐标' ]
param | [ 'x String X轴坐标', 'y String X轴坐标' ]
**constructor | function Object() { [native code] }**
TypeError: res[currentKey].push is not a function
at comments.split.forEach.c (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:117:37)
at Array.forEach (<anonymous>)
at commentNodes.forEach (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:112:34)
at Array.forEach (<anonymous>)
at getComments (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:93:18)
at ObjectProperty.properties.forEach (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:245:37)
at Array.forEach (<anonymous>)
at ObjectProperty (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:244:24)
at NodePath._call (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\path\context.js:53:20)
at NodePath.call (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\path\context.js:40:17)
at NodePath.visit (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\path\context.js:88:12)
at TraversalContext.visitQueue (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\context.js:118:16)
at TraversalContext.visitMultiple (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\context.js:85:17)
at TraversalContext.visit (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\context.js:144:19)
at Function.traverse.node (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\index.js:94:17)
at NodePath.visit (C:\Users\ferrinweb\AppData\Local\Yarn\Data\global\node_modules\@babel\traverse\lib\path\context.js:95:18)
so i think you can check the value obtained from 'res[currentKey]', pay attention to the words wrapped with '**' in the error stack above.
from vuese.
@ferrinweb
I guess your comment should look like:
/**
* @param xxx
* @constructor xxx
*/
But only @arg
is really recognized.
Read the documentation carefully:
https://github.com/HcySunYang/vuese#write-a-document-for-your-component
from vuese.
Another error stack:
TypeError: Cannot read property 'children' of undefined
at Object.comment (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vue-template-compiler\build.js:2575:21)
at parseHTML (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vue-template-compiler\build.js:345:23)
at parse (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vue-template-compiler\build.js:2402:3)
at baseCompile (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vue-template-compiler\build.js:4267:13)
at Object.compile (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vue-template-compiler\build.js:4242:22)
at sfcToAST (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:28:47)
at parser$1 (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vuese\dist\vuese.js:402:20)
at files.map (C:\Users\zuoyi\AppData\Local\Yarn\Data\global\node_modules\vuese\lib\index.js:30:23)
at <anonymous>
Does a multi-line comment (such as the one below) cause the error?
<!-- Author: ferrinweb -->
<!-- Create Time: 2018/9/30 14:34 -->
<!-- Description: image-editor -->
<!-- How to use?
import as component, and then:
<image-editor class="image-editor hw100"
v-if="showEditor"
:source="editSource"
@image-edit-done="showNewImage"
></image-editor>
-->
from vuese.
I have test, and you are right. thanks!
Thank you for this amazing work, again!
from vuese.
same problem... your Basic component
from vuese.
Close inactive
from vuese.
Related Issues (20)
- does not find any .vue file HOT 1
- TypeError: Cannot read property 'forEach' of undefined
- need an example config file HOT 1
- The environment variable CHROME_PATH must be set to executable of a build of Chromium HOT 5
- Question: Lifecycle hook documentation
- mixins parse error HOT 1
- The slot in another component's slot won't parse
- Question: document instance property on Typescript
- Using @group causes 404 on load HOT 2
- name 解析错误 HOT 3
- Adaptation for Nuxt
- Display the preview of a component
- Composition API HOT 2
- name parsing error, generate index.md HOT 1
- Could some tags be the same format with JSDOC?
- Description of the component not generate in the docs, vuese doesn't create group
- SpreadElement in Props Object doesn't extract success HOT 2
- Props not read when using defineComponent HOT 1
- Package version mismatch on new Vue 3 project. HOT 1
- 执行生成文档网站命令,出现多个Index Tab
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuese.