Skip to content

Commit 94a7f45

Browse files
committed
v0.3.0
1 parent 8a491b6 commit 94a7f45

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ This pattern keeps your page components clean while maintaining full access to H
191191

192192
## Configuration
193193

194-
### deno.json
194+
Add this to your `deno.json`:
195195

196196
```jsonc
197197
{
@@ -200,13 +200,13 @@ This pattern keeps your page components clean while maintaining full access to H
200200
},
201201
"compilerOptions": {
202202
"jsx": "react-jsx",
203-
"jsxImportSource": "hsx",
204-
"lib": ["dom", "dom.iterable", "deno.ns"],
205-
"strict": true
203+
"jsxImportSource": "hsx"
206204
}
207205
}
208206
```
209207

208+
JSX intrinsic element types (`<div>`, `<form>`, `<button>`, etc.) are automatically included via the jsx-runtime import—no additional type configuration needed.
209+
210210
### Serving HTMX
211211

212212
HSX injects `<script src="/static/htmx.js">` when HTMX is used. You must serve it:

deno.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@srdjan/hsx",
3-
"version": "0.2.0",
3+
"version": "0.3.0",
44
"exports": {
55
".": "./src/index.ts",
66
"./jsx-runtime": "./src/jsx-runtime.ts"
@@ -12,10 +12,8 @@
1212
"compilerOptions": {
1313
"jsx": "react-jsx",
1414
"jsxImportSource": "hsx",
15-
"types": ["./src/hsx-jsx.d.ts"],
1615
"lib": ["dom", "dom.iterable", "deno.ns"],
17-
"strict": true,
18-
"module": "esnext"
16+
"strict": true
1917
},
2018
"tasks": {
2119
"test": "deno test src/ --allow-read",

src/jsx-runtime.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference path="./hsx-jsx.d.ts" />
2+
13
/**
24
* HSX JSX Runtime - Internal module for JSX transformation.
35
*

src/render_test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @jsxImportSource . */
1+
/** @jsxImportSource hsx */
22
import { assertEquals, assertThrows } from "https://deno.land/std@0.208.0/assert/mod.ts";
33
import { renderHtml, render, Fragment, route, id } from "./index.ts";
44

0 commit comments

Comments
 (0)