@byre/vellum
v1.2.0
Published
Vellum: a minimal, DOM-centric mod loader kernel for web applications
Maintainers
Readme
@byre/vellum
Vellum is a minimal, DOM-centric mod loader kernel for web applications.
It provides two custom elements:
<vellum-host>(or any registered name) — coordinates mod discovery and lifecycle<vellum-mod>(or any registered name) — declarative markers for loadable modules
Features
- DOM is the source of truth (state via attributes:
loading,loaded,failed,unloading) - Hard (
require) and soft (after) dependencies with cycle detection - Priority + DOM order tie-breaking
- Dynamic addition/removal,
disabled,srcchanges - Nested hosts supported
- Native ES modules via
import() - No framework lock-in — just loading and lifecycle coordination
Installation
npm install @byre/vellumQuick Start
// app.js
import { VellumHost, VellumMod } from '@byre/vellum';
customElements.define('my-app', VellumHost);
customElements.define('my-mod', VellumMod);<my-app mod-tag="my-mod">
<my-mod src="./core.mjs" name="core" priority="1"></my-mod>
<my-mod src="./ui.mjs" name="ui" require="core" after="logger"></my-mod>
</my-app>See the full specification for details.
Development
npm install
npm run dev
npm test
npm run buildLicense
MIT
