-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
feat: Add support for Quasar Framework #865
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,15 @@ import { | |
onsenTagProvider, | ||
bootstrapTagProvider, | ||
buefyTagProvider, | ||
vuetifyTagProvider | ||
vuetifyTagProvider, | ||
getQuasarTagProvider | ||
} from './externalTagProviders'; | ||
export { getComponentTags } from './componentTags'; | ||
export { IHTMLTagProvider } from './common'; | ||
|
||
import * as ts from 'typescript'; | ||
import * as fs from 'fs'; | ||
import { join } from 'path'; | ||
|
||
export let allTagProviders: IHTMLTagProvider[] = [ | ||
getHTML5TagProvider(), | ||
|
@@ -39,7 +41,8 @@ export function getTagProviderSettings(workspacePath: string | null | undefined) | |
onsen: false, | ||
bootstrap: false, | ||
buefy: false, | ||
vuetify: false | ||
vuetify: false, | ||
quasar: false | ||
}; | ||
if (!workspacePath) { | ||
return settings; | ||
|
@@ -68,6 +71,22 @@ export function getTagProviderSettings(workspacePath: string | null | undefined) | |
if (packageJson.dependencies['vuetify']) { | ||
settings['vuetify'] = true; | ||
} | ||
|
||
const quasarPath = ts.findConfigFile( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Follow the pattern above
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is best for all the ways Quasar can be consumed (through Quasar CLI, vue-cli-plugin-quasar, etc etc). Explained on private. |
||
workspacePath, | ||
ts.sys.fileExists, | ||
join('node_modules', 'quasar-framework', 'package.json') | ||
); | ||
if (quasarPath) { | ||
const quasarPkg = JSON.parse(fs.readFileSync(quasarPath, 'utf-8')); | ||
if (quasarPkg.vetur) { | ||
const provider = getQuasarTagProvider(workspacePath, quasarPkg); | ||
if (provider !== null) { | ||
allTagProviders.push(provider); | ||
settings['quasar'] = true; | ||
} | ||
} | ||
} | ||
} catch (e) {} | ||
return settings; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NVM, see the other comment.