Iridium is a markdown-native web framework built around .ir files and exposed as a Vite plugin. This repository now includes:
- file-based routing for app
src/pages - reusable
.ircomponents from appsrc/componentsandsrc/layouts ---page,---mdstyle, and---tsblocks- markdown rendering with
{expression}interpolation - built-in markdown defaults for hierarchy and spacing even without
---mdstyle ---mdstyledefaults that still yield to explicit wrapper and element text classes@if,@each,@as,@link,@click,@bind,@slot,@props, and inline element decorators- Vite-powered dev/build flow with prerendered static routes
- bundled client runtime for true island hydration and subtree rerendering
- client-side
@linknavigation between Iridium pages - colocated
.ir.tsexecution with imported modules and top-levelawaiton the server - Tailwind CSS bundled through Vite with
.irfiles included in class scanning - a publishable package build in
dist/ - a consumer verification app in
examples/package-app - a reusable language-analysis layer and VS Code extension in
extensions/vscode
bun install
bun run build:package
cd examples/package-app
bun install
bun run devThen open the local Vite URL from the example app.
bun add iridium vite tailwindcss @tailwindcss/viteimport tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import { iridium } from "iridium";
export default defineConfig({
plugins: [tailwindcss(), iridium()],
});Then add your .ir files under:
src/
pages/
components/
layouts/
Iridium is wired through vite.config.ts using the exported iridium() plugin from index.ts.
bun run devin your app starts Vite with Iridium route handlingbun run buildin your app prerenders static.irroutes intodist- Tailwind styles are loaded from
src/styles/iridium.cssthrough the Vite asset graph - colocated
.ir.tsfiles can import sibling modules and export SSR-ready values - dynamic routes such as
[slug].ircan be prerendered by passinggetStaticPathstoiridium() - pages can also export
staticParamsfrom inline---tsor a colocated.ir.ts
import tailwindcss from "@tailwindcss/vite";
import { defineConfig } from "vite";
import { iridium } from "./index";
export default defineConfig({
plugins: [
tailwindcss(),
iridium({
getStaticPaths(route) {
if (route.routePath === "/blog/:slug") {
return [{ slug: "hello-world" }, { slug: "launch-post" }];
}
return [];
},
}),
],
});---ts
export function staticParams() {
return [{ slug: "hello-world" }, { slug: "launch-post" }]
}
---
src/
pages/
components/
layouts/
Pages map to routes. Components and layouts are auto-resolved by filename.
This framework repository keeps its demo app in examples/package-app so the package source stays focused on the framework itself.
Build the publishable package with:
bun run build:packageThis emits the public package into dist/ and exposes:
iridiumiridium/runtime/clientiridium/language
The repository includes a VS Code extension at extensions/vscode.
cd extensions/vscode
bun install
bun run buildThe shared language intelligence lives in the main package so other editors can reuse it through iridium/language instead of reimplementing Iridium parsing and project resolution themselves.
To test the published shape locally:
npm pack
cd examples/package-app
bun install
bun run buildexamples/package-app is wired as a real consumer app that installs the packed tarball rather than importing the framework source directly.
This implementation is now usable for real .ir pages, but there are still a few framework-level gaps:
- hydration boundaries are node-level islands, but there is not yet a compiler pass that hoists static island internals or does deeper payload deduplication
- inline
---tsblocks support top-levelawait, but inline module code is still less capable than colocated.ir.tsfiles - inline scripts are merged with colocated scripts for runtime scope, but inline code should not yet depend on colocated exports at module-evaluation time
- dynamic route params now support build-time expansion from both Vite config and page-module exports, but there is not yet a dedicated
---pagesyntax for them