Skip to content

fix: Re-add Quasar Framework pre v1 support #1273

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

Merged
merged 1 commit into from
May 4, 2019
Merged

Conversation

rstoenescu
Copy link
Contributor

TLDR; I added support for the vetur Object in package.json (which specifies the location of Vetur's needed tags and attributes jsons) specifically for Quasar. A later change in Vetur code made this feature available for all frameworks, but removed Quasar support as a result, which is ironic. Quasar developers are missing the autocompletion feature since 5 November.

Reasoning

This PR re-adds support for Quasar Framework (< v1) when using Quasar CLI.

I initially introduced the concept of using package.json > vetur Object to specify the location of vetur tags and attributes file with PR. This was done for Quasar Framework only.

Later on, this concept became the default way of dealing with any frameworks through PR by @Zenser . But while introducing this, Quasar became undetectable, so its support dropped.

In a Quasar CLI project folder, Quasar Framework pre v1 (eg: v0.17) is supplied by quasar-cli package which is specified in package.json > devDependencies through quasar-framework package (quasar-framework is a dependency of quasar-cli, not of the project itself). This was missed by @Zenser 's PR, because Vetur ended up checking quasar-cli's package.json for the vetur Object that I introduced -- which is not there. My initial code was detecting quasar-cli package and then it was checking node_modules/quasar-framework/package.json to get the details. My initial PR added a test-case specifically for Quasar, but it was directly using quasar-framework package as a dependency (as in Vue CLI usage of a project with Quasar), instead of quasar-cli. So the tests were successful -- since quasar-framework dependency was specified in the test project folder, which is the NPM package that has the vetur Object in its package.json.

The current PR detects if quasar-cli is specified in a project's devDependencies and virtually adds quasar-framework to the in-memory package.json > dependencies. This allows Vetur to correctly get the provider a few lines below this in the for(dep in dependencies).

@octref
Copy link
Member

octref commented May 4, 2019

LGTM. Sorry for the situation and thanks for the detailed explanation!

@octref octref merged commit a9f77fb into vuejs:master May 4, 2019
@octref octref added this to the April 2019 milestone May 4, 2019
@rstoenescu
Copy link
Contributor Author

@octref Thanks for merging.

Will write a doc page for Quasar recommending an IDE to use (VSCode) and what extensions to install for it -- and this will include Vetur.

@vue-bot
Copy link

vue-bot commented May 4, 2019

Thanks again! Cheers! 💚

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

Successfully merging this pull request may close these issues.

3 participants