@cmj/juice 0.6.5 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +24 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -124,11 +124,35 @@ router.prefetch('/settings');
124
124
 
125
125
  In dev mode, the Vite plugin auto-injects a client bootstrap that intercepts navigations via the Navigation API — SPA transitions with View Transitions, zero config.
126
126
 
127
+ ## CSS & Styling
128
+
129
+ Import `.css` files from any component — they're collected and injected as `<link>` tags automatically.
130
+
131
+ ```tsx
132
+ // app/routes/layout.tsx
133
+ import './global.css';
134
+ ```
135
+
136
+ CSS modules work out of the box:
137
+
138
+ ```tsx
139
+ import styles from './Button.module.css';
140
+ <button className={styles.root}>Click</button>
141
+ ```
142
+
143
+ | Environment | Mechanism |
144
+ |---|---|
145
+ | **Dev** | Vite module graph walked recursively — `<link>` tags in `<head>` |
146
+ | **Production** | CSS assets tracked in `flight-manifest.json` under the `css` key |
147
+
148
+ PostCSS, Sass, Less, Stylus — anything Vite supports works automatically.
149
+
127
150
  ## Features
128
151
 
129
152
  - **React 19 RSC** — Server Components, Suspense, streaming SSR
130
153
  - **Server Actions** — `'use server'` with FormData + opt-in `ActionContext` for headers, cookies, params
131
154
  - **SPA navigation** — `<Link>` component + `useRouter()` hook + Navigation API bootstrap in dev
155
+ - **CSS pipeline** — `import './styles.css'`, CSS modules, PostCSS, Sass — dev and production
132
156
  - **Zero config** — One plugin call, no magic files
133
157
  - **One dependency** — Only `urlpattern-polyfill` for cross-platform routing
134
158
  - **Multi-platform** — Bun, Node.js, Cloudflare Workers, Deno
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmj/juice",
3
- "version": "0.6.5",
3
+ "version": "0.7.0",
4
4
  "description": "Zero-bloat React 19 RSC framework — streaming SSR, server actions, zero config.",
5
5
  "type": "module",
6
6
  "keywords": [