Skip to content

aklkv/vite-plugin-ember

Repository files navigation

Live Ember demos — engine + integrations

CI License: MIT

A monorepo for compiling and rendering live .gjs / .gts Ember components inside docs and preview tools — without standing up a full Ember app.

View the live documentation →

Packages

Package npm What it does
ember-live-compiler npm Bundler-agnostic engine. Node createNodeCompiler() (Babel + content-tag) and a browser render() API. Use it to build your own integration.
vite-plugin-ember npm The reference integration: Vite plugin + VitePress helpers (```gjs live fences, <CodePreview>, setupEmber).

The engine is designed to power live Ember demos in any docs/preview stack — VitePress (shipped), Docusaurus, Storybook, Backstage TechDocs, kolay, ember-cli-addon-docs (planned / community).

Which package do I want?

  • Writing a VitePress site and want to embed live Ember components → use vite-plugin-ember. The README there has the full quick-start (install → configure → write a fence).
  • Plain Vite, no VitePressvite-plugin-ember also works standalone; its VitePress helpers live behind separate subpath exports you can ignore.
  • Building a plugin for a different bundler or docs tool → depend on ember-live-compiler and wrap its createNodeCompiler() / render() with the bundler-specific glue.
  • You want a full Ember app on Vite (replacement for ember-cli / @embroider/vite) → not the goal of this project.

Repository layout

├── ember-live-compiler/   # Bundler-agnostic engine (published to npm)
│   └── src/
│       ├── index.ts                 # Node entry — createNodeCompiler()
│       ├── compile.node.ts          # Babel + content-tag pipeline
│       ├── create-owner.ts          # Map-backed Ember owner
│       ├── runtime/                 # Browser entry — render(), createOwner
│       └── resolver/                # Pure @ember/* resolution helpers
├── vite-plugin-ember/     # Vite plugin + VitePress helpers (published to npm)
│   └── src/
│       ├── index.ts                 # Vite plugin (delegates compile to engine)
│       └── vitepress/               # CodePreview, ember-fence, setupEmber
├── docs/                  # VitePress documentation site (uses both above)
│   ├── demos/             # .gjs/.gts demo components
│   └── guide/             # Documentation pages
├── package.json           # Workspace root (private)
└── pnpm-workspace.yaml

Local development

pnpm install
pnpm dev        # runs the VitePress docs site against the workspace packages
pnpm build      # builds every workspace package + the docs site
pnpm lint       # lint + format check across workspaces

Requirements

  • Node.js ≥ 24
  • pnpm ≥ 10

Releasing

Releases are managed by release-plan and published via OIDC from .github/workflows/publish.yml. See RELEASE.md for the contributor flow.

License

MIT

About

Vite plugin for rendering live Ember components in VitePress documentation

Resources

License

Stars

Watchers

Forks

Contributors