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

chore: auto generate web-types.json to provide autocomplete for JetBrains IDEs #9440

Merged
merged 13 commits into from
Oct 24, 2019
Merged
Prev Previous commit
Next Next commit
feat(web-types): add source property for components
  • Loading branch information
piotrtomiak committed Oct 23, 2019
commit 5825514a7bb0d728f802fb8063760a2de4469842
8 changes: 7 additions & 1 deletion packages/api-generator/src/index.js
Original file line number Diff line number Diff line change
@@ -297,7 +297,13 @@ Object.keys(components).forEach(function (key) {
const attributes = mapArray(components[key].props, transformAttribute)
const events = mapArray(components[key].events, transformEvent)
const slots = mapArray(components[key].slots, transformSlot)
const tag = { name, attributes, events, slots }
const tag = {
name,
source: { module: './src/components/index.ts', symbol: name },
attributes,
events,
slots,
}
webTypes.contributions.html.tags.push(tag)

function mapArray (arr, mapper) {