htmx-router 1.0.0-alpha.0 → 1.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli/index.js +2 -2
- package/bin/client/mount.js +1 -2
- package/bin/client/watch.js +1 -1
- package/package.json +2 -2
package/bin/cli/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { relative } from "path";
|
|
|
5
5
|
import { GenerateClient } from "../client/index.js";
|
|
6
6
|
import { ReadConfig } from "../cli/config.js";
|
|
7
7
|
const config = await ReadConfig();
|
|
8
|
-
console.
|
|
8
|
+
console.info("Building router");
|
|
9
9
|
const routes = relative(config.router.output, config.router.folder).replaceAll("\\", "/").slice(1);
|
|
10
10
|
await writeFile(config.router.output, `/*------------------------------------------
|
|
11
11
|
* Generated by htmx-router *
|
|
@@ -53,6 +53,6 @@ export function RouteHeaders() {
|
|
|
53
53
|
</>
|
|
54
54
|
}`);
|
|
55
55
|
if (config.client) {
|
|
56
|
-
console.
|
|
56
|
+
console.info("Building client islands");
|
|
57
57
|
await GenerateClient(config.client, true);
|
|
58
58
|
}
|
package/bin/client/mount.js
CHANGED
|
@@ -36,7 +36,7 @@ function ClientMounter() {
|
|
|
36
36
|
return;
|
|
37
37
|
if (!global.CLIENT)
|
|
38
38
|
throw new Error("Client manifest missing");
|
|
39
|
-
console.
|
|
39
|
+
console.info("hydrating...");
|
|
40
40
|
for (const [funcName, element, json] of mountRequests) {
|
|
41
41
|
const func = global.CLIENT[funcName];
|
|
42
42
|
if (!func)
|
|
@@ -58,7 +58,6 @@ const script = "window.Router = (function () {"
|
|
|
58
58
|
+ CutString(ClientMounter.toString(), "{")[1]
|
|
59
59
|
+ ")();";
|
|
60
60
|
const hash = QuickHash(script);
|
|
61
|
-
console.log(CutString(ClientMounter.toString(), "{")[1]);
|
|
62
61
|
export function _resolve(fragments) {
|
|
63
62
|
if (!fragments[2])
|
|
64
63
|
return null;
|
package/bin/client/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "htmx-router",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.1",
|
|
4
4
|
"description": "A simple SSR framework with dynamic+client islands",
|
|
5
5
|
"main": "./bin/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/AjaniBilby/htmx-router#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"es-module-lexer": "^1.5.4",
|
|
24
25
|
"vite": "^6.0.1"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
28
|
"@types/node": "^20.4.5",
|
|
28
|
-
"es-module-lexer": "^1.5.4",
|
|
29
29
|
"ts-node": "^10.9.1",
|
|
30
30
|
"tsc-alias": "^1.8.10",
|
|
31
31
|
"typescript": "^5.1.6"
|