Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new release] html_of_jsx (0.0.1) #25225

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

davesnx
Copy link
Contributor

@davesnx davesnx commented Feb 10, 2024

Render HTML writing JSX

CHANGES:

0.0.1

  • First working version of the ppx and library
  • Supports most of features from 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)
  • 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 and mlx
  • Supports some htmx under the ppx (html_of_jsx.ppx -htmx)

CHANGES:

## 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`)
@mseri
Copy link
Member

mseri commented Feb 12, 2024

On freebsd it fails with

# +  /tmp/dune_cram_62cc2e_.component.t/1.sh: ../ppx.sh: not found

I don't know if the problem is with this package or dune. It does not block the merge since freebsd in the CI is still experimental.

@mseri mseri merged commit 91266cb into ocaml:master Feb 12, 2024
1 of 2 checks passed
@mseri
Copy link
Member

mseri commented Feb 12, 2024

Thanks

@davesnx
Copy link
Contributor Author

davesnx commented Feb 12, 2024

Thanks to you @mseri

@davesnx
Copy link
Contributor Author

davesnx commented Feb 12, 2024

I can't tell what's the error on freebsd, but on the cram tests we use a ppx.sh script that is used as dep. Probably freebsd fails at symlink it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants