question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jsdoc-vuejs not compatible with JavaScript modules?

See original GitHub issue

JSDoc-vuejs is great. But when I use it, the comments for function in a module will disappear.

For example, I create a vue project:

vue init jsdoc-test
cd jsdoc-test
npm install -S jsdoc jsdoc-vuejs

And then I create the configuration file jsdoc.config.json:

{
  "plugins": [
    "node_modules/jsdoc-vuejs"
  ],
  "source": {
    "includePattern": "\\.(vue|js)$"
  }
}

There are two modules: test-es.js and test-common.js:

/**
 * @module /test-es
 */

/**
 * print hello
 */
function hello () {
	console.log('hello');
}
export default {
	hello
};

/**
 * @module /test-common
 */

module.exports = {
	/**
	 * @param {string} i - parameter to be printed
	 */
	test: function(i) {
		console.log(i);
	}
};

Then I test them with and without jsdoc.config.json:

jsdoc -c jsdoc.config.json test-es.js test-common.js
jsdoc test-es.js test-common.js

The results are different: comments for the methods disappear if I use jsdoc.config.json.

Do I miss something or is there a real issue?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pkuwwtcommented, Nov 17, 2018

@pkuwwt PR #137 should fix this issue. Would you mind to try it?

It works!. Thanks.

0reactions
Kocalcommented, Nov 17, 2018

Released in v2.3.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsdoc-vuejs - npm
A JSDoc plugin for documenting vue 3 files.. Latest version: 4.0.0, last published: a year ago. Start using jsdoc-vuejs in your project by ......
Read more >
JavaScript modules via script tag | Can I use... Support tables ...
Loading JavaScript module scripts (aka ES6 modules) using <script type="module"> Includes support for the nomodule attribute. Usage % of.
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax. ... Report problems with this compatibility data on GitHub ......
Read more >
Javascript module not working in browser? - Stack Overflow
0. The short answer. You need to install and run a local web server. - For a suggestion on how, read on. 1....
Read more >
Modules in JavaScript – CommonJS and ESmodules Explained
ESmodules is a more modern approach that is currently supported by browser and server-side apps with Node. Let's see this in code. Once...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found