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 · 7 comments
Open

<script setup> Support #458

dribeiro-tc opened this issue Mar 30, 2022 · 7 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 : '';

@hybridwebdev
Copy link

Is there any

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 : '';

Is there any chance you can submit a PR for this change? If not, I'll try my best to make one.

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

8 participants