ssr-metas #26
23
.vscode/launch.json
vendored
Normal file
23
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"request": "launch",
|
||||||
|
"name": "Launch Program",
|
||||||
|
"type": "node",
|
||||||
|
"program": "${workspaceFolder}/server.tsx",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"runtimeExecutable": "deno.exe",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run",
|
||||||
|
"--unstable",
|
||||||
|
"--inspect-wait",
|
||||||
|
"--allow-all"
|
||||||
|
],
|
||||||
|
"attachSimplePort": 9229
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
52
deno.lock
Normal file
52
deno.lock
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
"version": "2",
|
||||||
|
"remote": {
|
||||||
|
"https://deno.land/std@0.151.0/async/debounce.ts": "564273ef242bcfcda19a439132f940db8694173abffc159ea34f07d18fc42620",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/_db.ts": "7606d83e31f23ce1a7968cbaee852810c2cf477903a095696cdc62eaab7ce570",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/_util.ts": "916efbd30b6148a716f110e67a4db29d6949bf4048997b754415dd7e42c52378",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/content_type.ts": "c682589a0aeb016bfed355cc1ed6fbb3ead2ea48fc0000ac5de6a5730613ad1c",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/extension.ts": "7a4ef2813d7182f724a941f38161525996e4a67abc3cf6a0f9bc2168d73a0f0e",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/extensions_by_type.ts": "4358023feac696e6e9d49c0f1e76a859f03ca254df57812f31f8536890c3a443",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/format_media_type.ts": "1e35e16562e5c417401ffc388a9f8f421f97f0ee06259cbe990c51bae4e6c7a8",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/get_charset.ts": "8be15a1fd31a545736b91ace56d0e4c66ea0d7b3fdc5c90760e8202e7b4b1fad",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/mod.ts": "d3f0b99f85053bc0b98ecc24eaa3546dfa09b856dc0bbaf60d8956d2cdd710c8",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/parse_media_type.ts": "bed260d868ea271445ae41d748e7afed9b5a7f407d2777ead08cecf73e9278de",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/type_by_extension.ts": "6076a7fc63181d70f92ec582fdea2c927eb2cfc7f9c9bee9d6add2aca86f2355",
|
||||||
|
"https://deno.land/std@0.180.0/media_types/vendor/mime-db.v1.52.0.ts": "6925bbcae81ca37241e3f55908d0505724358cda3384eaea707773b2c7e99586",
|
||||||
|
"https://deno.land/std@0.185.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462",
|
||||||
|
"https://deno.land/std@0.185.0/json/common.ts": "ecd5e87d45b5f0df33238ed8b1746e1444da7f5c86ae53d0f0b04280f41a25bb",
|
||||||
|
"https://deno.land/std@0.185.0/jsonc/mod.ts": "b88dce28eb3645667caa856538ae2fe87af51410822544a0b45a4177ef3bd7dd",
|
||||||
|
"https://deno.land/std@0.185.0/jsonc/parse.ts": "2910e33bc7c3b243e3b6f3a39ce4d6ca84337b277a8df6f2ad2d9e4adbcddc08",
|
||||||
|
"https://deno.land/x/denoflate@1.2.1/mod.ts": "f5628e44b80b3d80ed525afa2ba0f12408e3849db817d47a883b801f9ce69dd6",
|
||||||
|
"https://deno.land/x/denoflate@1.2.1/pkg/denoflate.js": "b9f9ad9457d3f12f28b1fb35c555f57443427f74decb403113d67364e4f2caf4",
|
||||||
|
"https://deno.land/x/denoflate@1.2.1/pkg/denoflate_bg.wasm.js": "d581956245407a2115a3d7e8d85a9641c032940a8e810acbd59ca86afd34d44d",
|
||||||
|
"https://deno.land/x/esbuild@v0.17.4/mod.d.ts": "dc279a3a46f084484453e617c0cabcd5b8bd1920c0e562e4ea02dfc828c8f968",
|
||||||
|
"https://deno.land/x/esbuild@v0.17.4/mod.js": "28f92694d79c8ef313e7ead7bb0e915551a805c3ad14dd2af24bbb0872e38c0d",
|
||||||
|
"https://esm.sh/@twind/core@1.1.3": "022193fe0f683445f35b232bf4a105d2c2aa48cc035332b4939d4f795c7ed48f",
|
||||||
|
"https://esm.sh/preact-ssr-prepass@1.2.0": "2ad461cd2ebd0ccb3b0345102e51f94923084f089b85805da5ca97d0b8db77d2",
|
||||||
|
"https://esm.sh/preact@10.13.2/compat": "1cf68e0c8c6c84b60d42f30665403b67229c16ff5206824709b19df60ba9cdc3",
|
||||||
|
"https://esm.sh/stable/preact@10.13.2/deno/compat.js": "3151a948abd84aa75dfc9e57733da7e1a45fff7a25de58c7b6025b923874b508",
|
||||||
|
"https://esm.sh/stable/preact@10.13.2/deno/hooks.js": "c7a8e703bcbc6a05949f329b618c33d5d1ea5fee113ddcea44ff0f527af8556f",
|
||||||
|
"https://esm.sh/stable/preact@10.13.2/deno/preact.mjs": "365fab897381f4f403f859c5d12939084560545567108cc90dae901bbe892578",
|
||||||
|
"https://esm.sh/v113/preact-render-to-string@6.0.2": "9e27e8724b3e53ba3d006146efa7ac0d6764672e4cd7a2fb5738412526c2b16d",
|
||||||
|
"https://esm.sh/v113/preact-render-to-string@6.0.2/deno/preact-render-to-string.mjs": "09ead691b3745189a4171a6ee0948592c7a862b1bf1a97fe651fb34f88eabe3b",
|
||||||
|
"https://esm.sh/v113/preact-render-to-string@6.0.2/src/index.d.ts": "3df00ff7e5f6dc9d2d6b944a88c2e541b098c0e559bd3a918732f3aa35acf1af",
|
||||||
|
"https://esm.sh/v113/preact@10.13.2/src/index.d.ts": "65398710de6aa0a07412da79784e05e6e96763f51c7c91b77344d2d0af06385c",
|
||||||
|
"https://esm.sh/v113/preact@10.13.2/src/jsx.d.ts": "9ac9b82c199fa7b04748807d750eba1a106c0be52041b8617416f88d6fc0a257",
|
||||||
|
"https://esm.sh/v115/@twind/core@1.1.3/es2022/core.mjs": "937e906c390266871215f71372af7fadf98274fb47670a7e1e8cf98e775357a8",
|
||||||
|
"https://esm.sh/v115/@twind/preset-autoprefix@1.0.7/es2022/preset-autoprefix.mjs": "082486172119c516f5daf83cd178175302455fab8ed550a3cb58630864f0c4e3",
|
||||||
|
"https://esm.sh/v115/@twind/preset-tailwind@1.1.4/es2022/preset-tailwind.mjs": "7c561cfa2c639b259c390d4412f88b2f0675431b995261f1a5ef0916f1b9b48b",
|
||||||
|
"https://esm.sh/v115/style-vendorizer@2.2.3/es2022/style-vendorizer.mjs": "b0f813226f7c4a30e1742087311243bbb021ef9b201e064932fce1122625b29e",
|
||||||
|
"https://esm.sh/v118/preact-ssr-prepass@1.2.0/deno/preact-ssr-prepass.mjs": "302a0da48c6fb2232c6f713f17957e409ec909ccb8f5a4074065eb0ca7553ee3",
|
||||||
|
"https://esm.sh/v118/preact-ssr-prepass@1.2.0/typings/index.d.ts": "68d54a22a76ef21fd95266ba4d8c71b3228d5e7769baf899998d5348018671c4",
|
||||||
|
"https://esm.sh/v118/preact@10.13.2/compat/src/index.d.ts": "d02f015638a40e32649151e011cfda7b520d66f7fbd3c12a28fa03de2a5e1421",
|
||||||
|
"https://esm.sh/v118/preact@10.13.2/compat/src/suspense-list.d.ts": "b8e274324392157ce476ef3a48ae215c9f7003b08525d140645f19eab20d1948",
|
||||||
|
"https://esm.sh/v118/preact@10.13.2/compat/src/suspense.d.ts": "81f5266e0977a94347505d11b8103024211f2b4f3b2eb2aa276a10d8fd169e65",
|
||||||
|
"https://esm.sh/v118/preact@10.13.2/hooks/src/index.d.ts": "5c29febb624fc25d71cb0e125848c9b711e233337a08f7eacfade38fd4c14cc3",
|
||||||
|
"https://esm.sh/v118/preact@10.13.2/src/index.d.ts": "65398710de6aa0a07412da79784e05e6e96763f51c7c91b77344d2d0af06385c",
|
||||||
|
"https://esm.sh/v118/preact@10.13.2/src/jsx.d.ts": "9ac9b82c199fa7b04748807d750eba1a106c0be52041b8617416f88d6fc0a257",
|
||||||
|
"https://esm.sh/v119/@twind/core@1.1.3/core.d.ts": "87836d90ff43c5bd5cbb53df7adbcad9d9515fae21f8a31d34203027b7d75d29",
|
||||||
|
"https://esm.sh/v119/@twind/core@1.1.3/deno/core.mjs": "9a65476bdc46aeb10894c4496fbfbc863e45ffebf43e58d6320017f847aca7b2",
|
||||||
|
"https://esm.sh/v119/csstype@3.1.2/index.d.ts": "4c68749a564a6facdf675416d75789ee5a557afda8960e0803cf6711fa569288"
|
||||||
|
}
|
||||||
|
}
|
@ -4,9 +4,9 @@
|
|||||||
{
|
{
|
||||||
"react": "https://esm.sh/stable/preact@10.13.2/compat",
|
"react": "https://esm.sh/stable/preact@10.13.2/compat",
|
||||||
"@eno/app": "./app.tsx",
|
"@eno/app": "./app.tsx",
|
||||||
"@eno/iso": "http://localhost:4507/lib/iso.tsx"
|
"@eno/iso": "http://localhost:4507/lib/iso.tsx/"
|
||||||
},
|
},
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx --dev"
|
"dev": "deno run -A --unstable --reload=http://localhost:4507/ --no-lock app.tsx"
|
||||||
}
|
}
|
||||||
}
|
}
|
14
lib/iso.tsx
14
lib/iso.tsx
@ -1,13 +1,13 @@
|
|||||||
import TWPreTail from "https://esm.sh/v115/@twind/preset-tailwind@1.1.4/es2022/preset-tailwind.mjs";
|
import TWPreTail from "https://esm.sh/v115/@twind/preset-tailwind@1.1.4/es2022/preset-tailwind.mjs";
|
||||||
import TWPreAuto from "https://esm.sh/v115/@twind/preset-autoprefix@1.0.7/es2022/preset-autoprefix.mjs";
|
import TWPreAuto from "https://esm.sh/v115/@twind/preset-autoprefix@1.0.7/es2022/preset-autoprefix.mjs";
|
||||||
import React from "react";
|
import React, { JSX } from "react";
|
||||||
|
|
||||||
export const CSS = {
|
export const CSS = {
|
||||||
presets: [TWPreTail(), TWPreAuto()],
|
presets: [TWPreTail(), TWPreAuto()],
|
||||||
hash:false
|
hash:false
|
||||||
};
|
};
|
||||||
|
|
||||||
if(!window.innerWidth)
|
if(!window.innerWidth && !Deno.mainModule.endsWith("server.tsx"))
|
||||||
{
|
{
|
||||||
import(import.meta.resolve("../../server.tsx")).then(()=>{console.log("...imported!");});
|
import(import.meta.resolve("../../server.tsx")).then(()=>{console.log("...imported!");});
|
||||||
}
|
}
|
||||||
@ -92,6 +92,16 @@ export const Meta =
|
|||||||
});
|
});
|
||||||
}, Object.keys(props).map( (key) => props[key as MetaKeys] ));
|
}, Object.keys(props).map( (key) => props[key as MetaKeys] ));
|
||||||
|
|
||||||
|
if(!window.innerWidth && props.title)
|
||||||
|
{
|
||||||
|
Meta.Meta.title = props.title;
|
||||||
|
console.log(`setting title`, Meta.Meta.title);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
console.log("nope");
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user