3
1
Fork
You've already forked experimental-plugins
1

Update hono-jsx plugin to Lume v2 w/ more examples #33

Merged
runelk merged 3 commits from main into main 2024年02月03日 22:08:12 +01:00
runelk commented 2024年02月02日 09:12:19 +01:00 (Migrated from github.com)
Copy link

I went through the code for hono-jsx to make sure that I can use it with Lume v2 and the latest Hono version.

Summary:

  • the HonoJsxEngine class has been updated to conform to the changes in 2.0, and should more closely resemble the jsx and jsx-preact plugins in the main repo.
  • hono-jsx/deps.ts and hono-jsx/demo/import_map.json have been updated with recent versions of Lume and Hono (using npm specifiers for the Hono package).
  • jsxFactory and jsxFragmentFactory has been removed from hono-jsx/demo/deno.json as I'm pretty sure it's no longer necessary (let me know if that's not the case).
  • demo app has been updated with a couple more examples of pages, layouts and components.

Let me know if I've missed or misunderstood something and I'll take another look at it!

I went through the code for hono-jsx to make sure that I can use it with Lume v2 and the latest Hono version. Summary: - the HonoJsxEngine class has been updated to conform to the changes in 2.0, and should more closely resemble the [jsx](https://github.com/lumeland/lume/blob/e990f125bbeafe19714e946687105e6003a7a47b/plugins/jsx.ts) and [jsx-preact](https://github.com/lumeland/lume/blob/e990f125bbeafe19714e946687105e6003a7a47b/plugins/jsx_preact.ts) plugins in the main repo. - `hono-jsx/deps.ts` and `hono-jsx/demo/import_map.json` have been updated with recent versions of Lume and Hono (using npm specifiers for the Hono package). - `jsxFactory` and `jsxFragmentFactory` has been removed from `hono-jsx/demo/deno.json` as I'm pretty sure it's no longer necessary (let me know if that's not the case). - demo app has been updated with a couple more examples of pages, layouts and components. Let me know if I've missed or misunderstood something and I'll take another look at it!

Thank you!

Thank you!
kwaa (Migrated from github.com) reviewed 2024年02月04日 07:52:30 +01:00
@ -1 +1,2 @@
export { jsx } from "https://deno.land/x/hono@v3.10.0/jsx/jsx-runtime.ts";
export { jsx } from "npm:hono@3.12.9/jsx/jsx-runtime";
export const specifier = "npm:hono@3.12.9";
kwaa (Migrated from github.com) commented 2024年02月04日 07:52:30 +01:00
Copy link

Since Hono provides deno builds, I don't think importing from npm would be a good idea.

Since Hono provides deno builds, I don't think importing from npm would be a good idea.
kwaa (Migrated from github.com) reviewed 2024年02月04日 07:59:32 +01:00
@ -1 +1,2 @@
export { jsx } from "https://deno.land/x/hono@v3.10.0/jsx/jsx-runtime.ts";
export { jsx } from "npm:hono@3.12.9/jsx/jsx-runtime";
export const specifier = "npm:hono@3.12.9";
kwaa (Migrated from github.com) commented 2024年02月04日 07:59:32 +01:00
Copy link

This will download the entire hono npm package (most of which is not needed by the hono jsx plugin), thus increasing the dependency size.

This will download the entire `hono` npm package (most of which is not needed by the hono jsx plugin), thus increasing the dependency size.
runelk (Migrated from github.com) reviewed 2024年02月05日 07:54:26 +01:00
@ -1 +1,2 @@
export { jsx } from "https://deno.land/x/hono@v3.10.0/jsx/jsx-runtime.ts";
export { jsx } from "npm:hono@3.12.9/jsx/jsx-runtime";
export const specifier = "npm:hono@3.12.9";
runelk (Migrated from github.com) commented 2024年02月05日 07:54:26 +01:00
Copy link

Ah, yeah that's better. Thanks for the feedback! :)

Ah, yeah that's better. Thanks for the feedback! :)
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lume/experimental-plugins!33
Reference in a new issue
lume/experimental-plugins
No description provided.
Delete branch "main"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?