Laminar type definitions for web component collections. Currently included collections:
Package is published to GitHub Packages in this repository. To reference it, you can use sbt-github-packages SBT plugin:
resolvers += Resolver.githubPackages("uosis")
libraryDependencies += "com.github.uosis" %%% "laminar-web-components-material" % "0.1.0"
Ensure you have sbt-scalajs-bundler plugin
Web Components have NPM dependencies.
Web Components have similar interface to built-in elements. See examples below.
Displays a collection of Web Components
To run:
cd examples/showcasesbt fastOptJS::webpack- Open
index-fastopt.htmlin browser
generator folder contains Ammonite scripts used to generate component type definitions. If you want to tweak the generated types, changes should be made here.
To run code generation:
amm generator/main.sc- Format
material/src/main/scala/material.scalausing scalafmt - Check in the new generated code
- Add/modify the component in the generation script
- For example, if it's a new Google Material Web Component, add it to
material.scusing one of the existing components as an example.
- For example, if it's a new Google Material Web Component, add it to
- Run code generation as described above
- Check in generated code
- Create new definitions script using
material.scas an example - Create new SBT project using
material/project as an example - Update
main.scto include new project - Run code generation
- Check in generated code