mix tessera.gen.component (Noizu.Tessera v0.2.0)

Copy Markdown View Source

Scaffolds a tessera web component in the current Mix project:

mix tessera.gen.component persona-card
mix tessera.gen.component persona-card --module MyApp.Components.PersonaCard

Writes:

  • the spec module (lib/..., from --module, default <AppCamel>.Components.<CamelTag>);
  • the colocated persona_card.mjs template (imports @noizu/tessera-core, exports register — replace the body, keep the export, CONTRACT.md §5);
  • a web-test-runner test skeleton at test/components/persona_card_test.mjs.

The generated contract module (persona_card.contract.generated.mjs) is written at the next mix compile. Run mix tessera.install once per host app to wire @noizu/tessera-core into assets/package.json.