@totto/hono-mastercss@0.2.0Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
Middleware for pre-rendering Master CSS in Hono.
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
a year ago (0.2.0)
hono-mastercss
Overview
Middleware for pre-rendering Master CSS in Hono.
- 0 client-side JavaScript required for initial rendering.
- No need to wait for @master/css-runtime to be generated for the first time.
- Of course, when used in conjunction with @master/css-runtime, it can also be used for Web Application using HTMX, etc!
Installation
npx jsr add @totto/hono-mastercss yarn dlx jsr add @totto/hono-mastercss pnpx jsr add @totto/hono-mastercss bux jsr add @totto/hono-mastercss
Usage
Without Config
import { Hono } from "@hono/hono"; import { mastercssMiddleware } from "@totto/hono-mastercss"; const app = new Hono(); app.use(masterCssMiddleware()); app.get("/", (c) => { return c.html( "<html><body><div class='m:50'>Hello World!!!</div></body></html>", ); }); // ...
With Config
import { Hono } from "@hono/hono"; import { masterCssMiddleware } from "@totto/hono-mastercss"; import config from "./mastercss.css.ts"; const app = new Hono(); app.use(masterCssMiddleware(config)); app.get("/", (c) => { return c.html( "<html><body><div class='m:50'>Hello World!!!</div></body></html>", ); }); // ...
For Developers
We use Deno.
The version is .mise.toml.
Check
deno task precommit
Built and signed on
GitHub Actions
Add Package
deno add jsr:@totto/hono-mastercss
Import symbol
import * as hono_mastercss from "@totto/hono-mastercss";
Import directly with a jsr specifier
import * as hono_mastercss from "jsr:@totto/hono-mastercss";
Add Package
pnpm i jsr:@totto/hono-mastercss
pnpm dlx jsr add @totto/hono-mastercss
Import symbol
import * as hono_mastercss from "@totto/hono-mastercss";
Add Package
yarn add jsr:@totto/hono-mastercss
yarn dlx jsr add @totto/hono-mastercss
Import symbol
import * as hono_mastercss from "@totto/hono-mastercss";
Add Package
vlt install jsr:@totto/hono-mastercss
Import symbol
import * as hono_mastercss from "@totto/hono-mastercss";
Add Package
npx jsr add @totto/hono-mastercss
Import symbol
import * as hono_mastercss from "@totto/hono-mastercss";
Add Package
bunx jsr add @totto/hono-mastercss
Import symbol
import * as hono_mastercss from "@totto/hono-mastercss";