Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ad17686
Add create-vite-extra/template-ssr-vanilla
Phoscur Dec 24, 2023
427c163
Fix Van type in components
Phoscur Dec 24, 2023
5c16e3a
Refactor page content to be loaded by vite
Phoscur Dec 25, 2023
ab69a20
Rename public folder (assets)
Phoscur Dec 25, 2023
8a22a53
Add bodyParser (back) to forward query parameters
Phoscur Dec 25, 2023
d9ab7be
Add VanJS & HTMX logos
Phoscur Dec 25, 2023
1de0e59
Remove redundant counter
Phoscur Dec 26, 2023
8148e26
Refactor expose Counters under /htmx/counters
Phoscur Dec 26, 2023
7061170
Refactor use double quotes
Phoscur Dec 26, 2023
2083013
Hydrate on htmx load
Phoscur Dec 26, 2023
aa18b86
Fix hydrate on htmx:load
Phoscur Dec 26, 2023
bba9a9d
Remove tsconfig
Phoscur Dec 26, 2023
11e05b6
Redact readme
Phoscur Dec 26, 2023
7df7f80
Add htmx ws example
Phoscur Dec 27, 2023
8b03746
Revert "Remove tsconfig"
Phoscur Jan 1, 2024
81f45f5
Revert to TypeScript
Phoscur Jan 1, 2024
5269b4b
Use tsx instead of nodemon
Phoscur Jan 1, 2024
180b967
Add vitest
Phoscur Jan 1, 2024
53e4e75
Add tailwind
Phoscur Jan 2, 2024
2654f84
Merge and apply tailwind styles
Phoscur Jan 27, 2024
c34bbd4
Add express types
Phoscur Jan 28, 2024
09e7e3d
Refactor extract chat
Phoscur Jan 28, 2024
6f957e2
Add Tailwind Logo
Phoscur Jan 28, 2024
6f9821c
Replace World with chancy Word
Phoscur Jan 28, 2024
45789db
Add prettier 3.2.1
Phoscur Jan 28, 2024
d6137e0
Autoformat with prettier
Phoscur Jan 28, 2024
bd7fc99
Add hono logo
Phoscur Mar 22, 2024
3616757
Add hono server(.ts)
Phoscur Mar 22, 2024
7c80d5e
Remove express dependencies
Phoscur Mar 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Copyright 2023 by Phoscur

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 changes: 14 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
# Van HTMX

## Background
Bing was sure the combination of Van.JS & HTMX was already out there, but checking the given links it turned out that GPT4 was phantasizing even citations! So I whipped this up:

It's just an Express server, which uses Van instead of pug-templates. The original example was in TypeScript, however I've refactored it to Vanilla JS, so the server does not require a build step.
It is a Vite Hono Server, which uses Van instead of pug-templates or Hypertext - however Hono leverages (static) JSX too... maybe that is nicer van VanJS...

Try to develop a new htmx-view while leveraging ultra-lightweight van-components!

```sh
npm install
npm start
# [...] on demand, build the client & server to preview production (prebuilt Vite SSR):
npm run build
npm run dev
# [...] on demand, rebuild the client:
npm run build
npm run preview
```
- Refresh the browser on demand

TODO
- Automatically reload (& rebuild) the client - HMR?
- Lint & format
- Tests
- Completely remove Typescript or switch to Bun to support it for the server-side (alternative: `ts-node-dev`)
### TODO

- eslint
- e2e tests

- remove server.js?!
- add hono/jsx example
- what about htmx/ws, reenable!?
- tailwind v4?
15 changes: 15 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite Van SSR and HTMX Example</title>
<!--app-head-->
</head>

<body>
<div id="app" class="container-xl mx-auto px-8"><!--app-html--></div>
<script type="module" src="/src/entry-client.js"></script>
</body>
</html>
35 changes: 0 additions & 35 deletions index.js

This file was deleted.

Loading