Skip to content

Commit

Permalink
[new release] html_of_jsx (0.0.2)
Browse files Browse the repository at this point in the history
CHANGES:

## 0.0.2

- Add `Jsx.unsafe` to allow unsafe HTML as children
- Fix HTML attributes formatting (charset, autocomplete, tabindex, inputmode, etc...)
- Enable HTMX attributes via `html_of_jsx.ppx -htmx`

## 0.0.1

- First working version of the ppx and library
- Supports most of features from [JSX](https://reasonml.github.io/docs/en/jsx) (uppercase components, fragments, optional attributes, punning)
- but with a few improvements (lowercase components, no need to add annotations)
- No React idioms (no `className`, no `htmlFor`, no `onChange`, etc...)
- Type-safe, validates attributes and their types ([it can be better thought](davesnx/html_of_jsx#2))
- Minimal
  - `Html_of_jsx.render` to render an element to HTML
  - `Jsx.*` to construct DOM Elements and DOM nodes (`Jsx.text`, `Jsx.int`, `Jsx.null`, `Jsx.list`)
- Works with [Reason](https://reasonml.github.io) and [mlx](https://github.com/andreypopp/mlx)
- Supports some htmx under the ppx (`html_of_jsx.ppx -htmx`)
  • Loading branch information
davesnx committed Apr 26, 2024
1 parent 01db0f1 commit a7c5d47
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions packages/html_of_jsx/html_of_jsx.0.0.2/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
opam-version: "2.0"
synopsis: "Render HTML writing JSX"
maintainer: ["David Sancho <[email protected]>"]
authors: ["David Sancho <[email protected]>"]
license: "MIT"
homepage: "https://github.com/davesnx/html_of_jsx"
bug-reports: "https://github.com/davesnx/html_of_jsx/issues"
depends: [
"dune" {>= "3.8"}
"ocaml" {>= "5.0.0"}
"reason" {>= "3.10.0"}
"ppxlib" {> "0.23.0" & <= "0.31.0"}
"alcotest" {with-test}
"odoc" {with-doc}
"ocamlformat" {= "0.26.1" & with-test}
"ocaml-lsp-server" {with-test}
"tiny_httpd" {with-test}
]
build: [
["dune" "subst"] {dev}
[
"dune"
"build"
"-p"
name
"-j"
jobs
"@install"
"@runtest" {with-test}
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/davesnx/html_of_jsx.git"
url {
src:
"https://github.com/davesnx/html_of_jsx/releases/download/0.0.2/html_of_jsx-0.0.2.tbz"
checksum: [
"sha256=24dc2b9e3726b99d9b0d218289222e7ca66a7250432dc202ecc1b8da4efba0e7"
"sha512=c06d87f7e9208dcd7e0ff054c4f2c69d89711474d0da8a43496e3da46c3978a85471e750183fb423e7531efb9fbe5fa432a6729853e49d3226d5eb5ac39b459f"
]
}
x-commit-hash: "01b3eabb38996779d11a5ad0b87251bc264ca678"

0 comments on commit a7c5d47

Please sign in to comment.