im so depressed

This commit is contained in:
Seth Trowbridge 2023-04-30 18:13:58 -04:00
parent 35592bb183
commit f36278453b
7 changed files with 2 additions and 96 deletions

View File

@ -1,13 +0,0 @@
import { doSomething } from './b.tsx';
export function doSomethingElse() {
if(Deno.env.get("a") && Deno.env.get("b")){return;}
Deno.env.set("a", "called");
console.log("a action");
doSomething();
}
import.meta.main

View File

@ -1,22 +0,0 @@
import * as mod from "https://deno.land/std@0.185.0/path/mod.ts";
import { doSomethingElse } from './a.tsx';
export function doSomething() {
const pathInit = Deno.mainModule;
const pathProj = mod.toFileUrl(Deno.cwd());
console.log(pathInit);
console.log(import.meta.url);
console.log(pathInit.split(pathProj));
console.log("b main?", Deno.mainModule);
console.log("deno main?", Deno.cwd());
Deno.env.set("b", "called");
console.log("b action");
doSomethingElse();
}

View File

@ -1,3 +0,0 @@
import { doSomethingElse } from "./a.tsx";
doSomethingElse();

View File

@ -1,16 +0,0 @@
{
"version": "2",
"remote": {
"http://localhost:4507/lib/iso.tsx": "edf1cf4c539900040c75824eac8472e0ec43098b13af4049bd79ddbd76a5346d",
"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/v116/preact@10.13.2/compat/src/index.d.ts": "d02f015638a40e32649151e011cfda7b520d66f7fbd3c12a28fa03de2a5e1421",
"https://esm.sh/v116/preact@10.13.2/compat/src/suspense-list.d.ts": "b8e274324392157ce476ef3a48ae215c9f7003b08525d140645f19eab20d1948",
"https://esm.sh/v116/preact@10.13.2/compat/src/suspense.d.ts": "81f5266e0977a94347505d11b8103024211f2b4f3b2eb2aa276a10d8fd169e65",
"https://esm.sh/v116/preact@10.13.2/hooks/src/index.d.ts": "5c29febb624fc25d71cb0e125848c9b711e233337a08f7eacfade38fd4c14cc3",
"https://esm.sh/v116/preact@10.13.2/src/index.d.ts": "65398710de6aa0a07412da79784e05e6e96763f51c7c91b77344d2d0af06385c",
"https://esm.sh/v116/preact@10.13.2/src/jsx.d.ts": "9ac9b82c199fa7b04748807d750eba1a106c0be52041b8617416f88d6fc0a257"
}
}

View File

@ -1,35 +0,0 @@
import {Fetch} from "./lib/iso.tsx";
const delay =async(inHandler:()=>void, inDelay:number):Promise<void>=>
{
return new Promise((accept)=>{
setTimeout(()=>{
accept(inHandler());
}, inDelay);
});
};
const queue = [1, 2, 3];
while(queue.length)
{
await(delay(()=>{console.log(queue.pop())}, 1000))
}
console.log("all done!");
/*
let r1, r2, r3;
delay(()=>{r1 = Fetch.Request(`https://catfact.ninja/fact`, undefined, 0.2); console.log(r1); }, 10);
delay(()=>{r2 = Fetch.Request(`https://catfact.ninja/fact`, undefined, 0.2); console.log(r2); }, 20);
delay(()=>{r3 = Fetch.Request(`https://catfact.ninja/fact`, undefined, 0.2); console.log(r3); }, 2000);
await delay(()=>{}, 3000);
console.log(r1);
console.log(r2);
console.log(r3);
*/

View File

@ -7,12 +7,7 @@ export const CSS = {
presets: [TWPreTail(), TWPreAuto()],
hash:false
};
/*
if(!window.innerWidth)
{
import(import.meta.resolve("../../server.tsx")).then(()=>{console.log("...imported!");});
}
*/
export function Boot(inApp:React.FunctionComponent, inCSS?:object)
{

View File

@ -243,7 +243,7 @@ const Path = {
AppDir: ""
};
console.log(Path);
console.log(`Dev Mode: ${DevMode}`);
console.log(`Dev Mode:`, DevMode);
console.log(`import.meta.url:`, import.meta.url);
console.log(`Deno.cwd():`, Deno.cwd());
console.log(`Deno.mainModule:`, Deno.mainModule);