@torpor/build 0.1.3 → 0.1.4
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/CHANGELOG.md +6 -0
- package/package.json +3 -3
- package/src/site/clientEntry.ts +1 -1
- package/src/site/serverEntry.ts +2 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@torpor/build",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "A framework for building sites and apps with Torpor",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"dotenv": "^16.4.7",
|
|
56
56
|
"vite": "^6.2.4",
|
|
57
57
|
"vite-tsconfig-paths": "^5.1.4",
|
|
58
|
-
"@torpor/
|
|
59
|
-
"@torpor/
|
|
58
|
+
"@torpor/unplugin": "^0.1.0",
|
|
59
|
+
"@torpor/view": "^0.0.7"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
|
package/src/site/clientEntry.ts
CHANGED
|
@@ -43,7 +43,7 @@ async function navigateToLocation(location: Location, firstTime = false) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async function navigate(path: string, query: URLSearchParams, firstTime = false): Promise<boolean> {
|
|
46
|
-
console.log(`navigating to '${path}'${query.size ? ` with ${query}` : ""}`);
|
|
46
|
+
//console.log(`navigating to '${path}'${query.size ? ` with ${query}` : ""}`);
|
|
47
47
|
|
|
48
48
|
const parent = document.getElementById("app");
|
|
49
49
|
if (!parent) {
|
package/src/site/serverEntry.ts
CHANGED
|
@@ -26,7 +26,7 @@ import Router from "./Router.ts";
|
|
|
26
26
|
const router = new Router();
|
|
27
27
|
router.addPages(manifest.routes);
|
|
28
28
|
|
|
29
|
-
console.log(`routes:\n ${router.routes.map((r) => r.path).join("\n ")}`);
|
|
29
|
+
//console.log(`routes:\n ${router.routes.map((r) => r.path).join("\n ")}`);
|
|
30
30
|
|
|
31
31
|
export async function load(ev: ServerEvent, template: string) {
|
|
32
32
|
//const url = new URL(`http://${process.env.HOST ?? "localhost"}${ev.request.url}`);
|
|
@@ -34,7 +34,7 @@ export async function load(ev: ServerEvent, template: string) {
|
|
|
34
34
|
const path = url.pathname;
|
|
35
35
|
const query = url.searchParams;
|
|
36
36
|
|
|
37
|
-
console.log(`handling ${ev.request.method} for '${path}'${query.size ? ` with ${query}` : ""}`);
|
|
37
|
+
//console.log(`handling ${ev.request.method} for '${path}'${query.size ? ` with ${query}` : ""}`);
|
|
38
38
|
|
|
39
39
|
const route = router.match(path, query);
|
|
40
40
|
if (!route) {
|