Generates a list of components and their selectors across all of the Carbon libraries.
Anyone can contribute a new component, or library. Just follow the steps below and submit a pull request.
-
Add a unique prefix to the
prefixSelectors.js
file. -
Create a file under
src/library
with the library name. -
import
your library's prefix, components, and stable attribute. -
Loop through your components, or manually add them based on the following data structure, and then export the resulting data.
{ 'unique-component-selector': 'component-display-name' }
💡 Thinking about maintenance, it's best to find a way to build this data from your component library. See how cloud-cognitive set up their components to scale.
- Add your new library file to the build file
src/index.js