Closed ChildishGiant closed 1 year ago
I'm having the same issue. I've worked out some syntax for using it with npm run
that seems like it will work:
My syntax is:
"docs": "jsdoc2md --plugin importAssertions --source app.js > docs.md"
...but I can't find the plugin itself (or any mention of it) online anywhere (so I get the error "Cannot find plugin: importAssertions."
Is it possible there is a dev dependency needed, something that jsdoc2markdown's dependency ends up using? Something like babel-import-assertions, something like that.
https://www.npmjs.com/package/@babel/plugin-syntax-import-assertions
See the jsdoc2md -c
option:
-c, --configure file Path to a jsdoc configuration file, passed directly to `jsdoc -c`.
This option passes config into jsdoc.. See the jsdoc config docs for more info..
So far as I can tell, there is no mention ANYWHERE of this plugin.
@75lb while I appreciate your comment I don't see how it solves the problem... the question is not where to configure the plugin but what plugin to configure!
What am I missing here?
Hey @75lb I'd really appreciate a little guidance here! We're using import assertions all over the place--because it's 2023--and it's killing our ability to use this otherwise very excellent tool.
Please help!
Morning @karmaniverous, apologies if I missed the crux of the issue.. Does your code documentation generate correctly if you use jsdoc directly? Meanwhile, I will try to reproduce this..
This is an issue upstream with jsdoc, I have posted a jsdoc issue asking how to solve it.. If anyone figures out a solution, please post here and on the jsdoc issue..
Ahhhh the dreaded upstream issue!
Thanks for responding so quickly. I'm keeping an eye on this one as well. Ping me if you need any help resolving!
Apparently the upstream ticket is resolved now, could you update jsdoc2md to pick up the change and give it a test please?
AWESOME! Works great. Just an FYI for the others, there's no version update to jsdoc2md. I had to uninstall & reinstall to pick up the deep dependency changes.
Cooking with gas now. Thank you sir!!
I'm trying to use this on my project that uses import assertions to import json but this currently throws an error
This experimental syntax requires enabling the parser plugin: "importAssertions"
and I don't see a way to do that currently.