Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<script setup> Support #458

Open
dribeiro-tc opened this issue Mar 30, 2022 · 6 comments
Open

<script setup> Support #458

dribeiro-tc opened this issue Mar 30, 2022 · 6 comments

Comments

@dribeiro-tc
Copy link

My docs were being generated correctly. Until I decided to upgrade my script tags to use script setup as Vue Docs recommends.

This led to my docs not being generated anymore.

Does jsdoc-vuejs supports <script setup>?

@vfiee
Copy link

vfiee commented Apr 21, 2022

Are there any updates?

@cbecker-tc
Copy link

Still no updates?

@andrewv517
Copy link

anything?

@kapitansen
Copy link

?

1 similar comment
@gzhqiang
Copy link

?

@tinawng
Copy link

tinawng commented Nov 29, 2023

Changes need to be made to the source code:

/package.json

"@vue/compiler-sfc": "3.3.9",

/lib/core/seekExportDefaultLine.js

if (inScript && /export\s+default/.test(line)) {
return i + 1; // index starts at 0, but file's lines start at 1
}

if (inScript && /<script\ssetup>/.test(line)) {
  return i;
}

/lib/core/vueScriptExtractor.js

let scriptContent = parsedComponent.descriptor.script ? parsedComponent.descriptor.script.content : null;
scriptContent ??= parsedComponent.descriptor.scriptSetup ? parsedComponent.descriptor.scriptSetup.content : '';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants