WeSC
We are the Superlative Components!
A streaming web component bundler written in Rust using the lol-html parser.
The idea is to create a single-file HTML component format and builder that builds the HTML result super fast (streaming, low memory) and is server language agnostic.
TODO: The JS (and CSS) in the top level script and style tag are bundled up separately and can be output as JS and CSS files.
Features
- Streaming HTML bundler
- Web component definition
- Default and named slots with fallback content
- Declarative Shadow DOM
- CSS bundling
- JS bundling
Example
Syntax
index.html
<!doctype html>
Title
Description
components/card.html
<!-- or <template shadowrootmode="open"> -->
Add a slotted title
Add default slotted content
<!-- TODO: bundle to a global styles.css -->
<!-- TODO: bundle to a global scripts.js -->