![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
cem-plugin-better-lit-types
Advanced tools
cem-plugin-better-lit-types
Extracts Typescript types from Lit components
First of all you have to have Custom Elements Manifest Analyzer installed
Install module using your favorite package manager eq:
npm install -D cem-plugin-better-lit-types
Create or add to existing custom-elements-manifest.config.mjs
following lines:
import BetterLitTypesPlugin from 'cem-plugin-better-lit-types';
export default {
plugins: [BetterLitTypesPlugin]
}
Storybook Types Mapper
In this package we also provides an types extractor for storybook and @storybook/web-components
that maps extracted types to storybook controls.
This method works only with the Storybook's web-components framework
Add default setup for web-components in you preview.js
import { setCustomElementsManifest } from '@storybook/web-components'
import customElements from '../custom-elements.json'
import { createArgsExtractor, createLitRenderer } from 'cem-plugin-better-lit-types/storybook'
Use extractor in your parameters.docs
section
export const parameters = {
docs: {
extractArgTypes: createArgsExtractor(customElements)
}
}
/**
* Custom renderer made specially for LitComponents
*/
export const render = createLitRenderer({
wrapSlots: true, // Wraps a non-default slot in `<span slot="name">`
joinArrays: true // Converts array to a comma-separated string
})
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.
FAQs
Updates CEM definitions with Typescript Schema
The npm package cem-plugin-better-lit-types receives a total of 123 weekly downloads. As such, cem-plugin-better-lit-types popularity was classified as not popular.
We found that cem-plugin-better-lit-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.