From 4b9b71f3124b31a0d8e63dfe9c1098919e9363db Mon Sep 17 00:00:00 2001 From: Guilherme Rodrigues Date: Wed, 19 Oct 2022 19:19:21 -0300 Subject: [PATCH 1/2] Make it run on deno 1.26 --- deno.json | 10 ++++++++++ deps.ts | 4 ++-- import_map.json | 7 +++++++ tsconfig.json | 7 ------- 4 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 deno.json create mode 100644 import_map.json delete mode 100644 tsconfig.json diff --git a/deno.json b/deno.json new file mode 100644 index 0000000..de4257d --- /dev/null +++ b/deno.json @@ -0,0 +1,10 @@ +{ + "tasks": { + "start": "deno run -A --watch local.ts" + }, + "importMap": "./import_map.json", + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "preact" + } +} \ No newline at end of file diff --git a/deps.ts b/deps.ts index c27a0b0..8119e72 100644 --- a/deps.ts +++ b/deps.ts @@ -1,4 +1,4 @@ export { default as puppeteer } from "https://deno.land/x/puppeteer@9.0.0/mod.ts"; export { Application, Router } from "https://deno.land/x/oak@v7.3.0/mod.ts"; -export * from "https://x.lcas.dev/preact@10.5.12/mod.js"; -export { renderToString } from "https://x.lcas.dev/preact@10.5.12/ssr.js"; +export * from "https://esm.sh/preact@10.10.6"; +export { renderToString } from "https://esm.sh/preact-render-to-string@5.2.0?deps=preact@10.10.6"; diff --git a/import_map.json b/import_map.json new file mode 100644 index 0000000..338ebdb --- /dev/null +++ b/import_map.json @@ -0,0 +1,7 @@ +{ + "imports": { + "preact": "https://esm.sh/preact@10.10.6", + "preact/": "https://esm.sh/preact@10.10.6/", + "preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.3?deps=preact@10.10.6" + } +} diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index ea4e02b..0000000 --- a/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "lib": ["esnext", "deno.ns", "deno.unstable", "dom", "dom.iterable", "dom.asynciterable"], - "jsxFactory": "h", - "jsxFragmentFactory": "Fragment", - } -} \ No newline at end of file From fea0eab9f19265b15a568a99e234774557fc3f30 Mon Sep 17 00:00:00 2001 From: Guilherme Rodrigues Date: Wed, 19 Oct 2022 19:48:43 -0300 Subject: [PATCH 2/2] Upgrade puppeteer --- deps.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps.ts b/deps.ts index 8119e72..11821ed 100644 --- a/deps.ts +++ b/deps.ts @@ -1,4 +1,4 @@ -export { default as puppeteer } from "https://deno.land/x/puppeteer@9.0.0/mod.ts"; +export { default as puppeteer } from "https://deno.land/x/puppeteer@16.2.0/mod.ts"; export { Application, Router } from "https://deno.land/x/oak@v7.3.0/mod.ts"; export * from "https://esm.sh/preact@10.10.6"; export { renderToString } from "https://esm.sh/preact-render-to-string@5.2.0?deps=preact@10.10.6";