@teacss/inspector
v0.10.11
Published
TeaCSS inspector: the dev-server page @teacss/vite mounts at /__teacss, reading the Rust engine (@teacss/engine)
Readme
@teacss/inspector
The TeaCSS inspector: a page on the development server that shows the resolved project, each module's tokens, the generated CSS and a REPL with completion. Token lookup is an endpoint, not a view: GET /__teacss/api/token/<token> (token percent-encoded) returns one token's match info as JSON. It reads the Rust engine (@teacss/engine) and answers loopback requests only.
You do not install it yourself. @teacss/vite, and so @teacss/astro, depends on it and serves it at /__teacss on the dev server. It never runs in a build. Pass inspector: false to the plugin to turn it off:
// vite.config.ts
import { teacss } from "@teacss/vite";
import { defineConfig } from "vite";
export default defineConfig({ plugins: [teacss({ inspector: false })] });The package exports createInspectorMiddleware(project), a Connect-compatible middleware over a Project from @teacss/engine, for hosts that mount it themselves.
Documentation
- The inspector
- Build integrations
- The TeaCSS skill for syntax, presets and tooling
