JSDoc - mark some code to not be parsed but retain documentation?

我是研究僧i 提交于 2019-12-05 08:27:36

My case is similar because I use JSDoc to comment my .less and .css file. When I running JSDoc on set of file, I have the same issue.

So, I resolve my problem (with JSDoc 3.3.3) with the commentsOnly JSDoc plugin

I have create this config.json:

{
    "source": {
        "includePattern": ".+\\.(css|less)?$"
    },
    "plugins": [
        "plugin/commentsOnly"
    ]
}

with the commentsOnly.js file into a plugin/ directory (consider plugin/ and config.json are in same folder) and in this folder I execute the following CLI command:

jsdoc -c ./config.json ./assets/stylesheets/common.less

And it's work ! There are no reason this do not work with your files.

Hope I help you ;)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!