diff --git a/examples/blog/deno.json b/examples/blog/deno.json index 3b3940f3..bb8d1502 100644 --- a/examples/blog/deno.json +++ b/examples/blog/deno.json @@ -1,15 +1,12 @@ { "lock": false, "tasks": { - "fedify-codegen": "cat ../../src/vocab/vocab.ts > /dev/null || (deno run --allow-read --allow-write --check ../../src/codegen/main.ts ../../src/vocab/ ../runtime/ > ../../src/vocab/vocab.ts && deno fmt ../../src/vocab/vocab.ts && deno cache ../../src/vocab/vocab.ts && deno check ../../src/vocab/vocab.ts)", - "generate-import-map": "deno run --allow-read --allow-write generate_import_map.ts", - "codegen": "deno task fedify-codegen && deno task generate-import-map", - "check": "deno task codegen && deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx", - "cli": "deno task codegen && echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -", - "manifest": "deno task codegen && deno task cli manifest $(pwd)", - "start": "deno task codegen && deno run -A --watch=static/,routes/ --unstable-kv dev.ts", - "build": "deno task codegen && deno run -A dev.ts build", - "preview": "deno task codegen && deno run -A main.ts", + "check": "deno fmt --check && deno lint && deno check **/*.ts && deno check **/*.tsx", + "cli": "echo \"import '\\$fresh/src/dev/cli.ts'\" | deno run --unstable -A -", + "manifest": "deno task cli manifest $(pwd)", + "start": "deno run -A --watch=static/,routes/ --unstable-kv dev.ts", + "build": "deno run -A dev.ts build", + "preview": "deno run -A main.ts", "update": "deno run -A -r https://fresh.deno.dev/update ." }, "lint": { @@ -23,7 +20,24 @@ "exclude": [ "**/_fresh/*" ], - "importMap": "./import_map.g.json", + "imports": { + "$fresh/": "https://deno.land/x/fresh@1.6.8/", + "@preact/signals": "https://esm.sh/*@preact/signals@1.2.2", + "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.5.1", + "@std/dotenv/load": "jsr:@std/dotenv@^0.224.0/load", + "@std/encoding/hex": "jsr:@std/encoding@^0.224.3/hex", + "@std/path": "jsr:@std/path@^0.225.2", + "@std/semver": "jsr:@std/semver@^0.224.3", + "@fedify/fedify": "jsr:@fedify/fedify@1.0.0-dev.414+f75c19cf", + "@hongminhee/x-forwarded-fetch": "jsr:@hongminhee/x-forwarded-fetch@^0.2.0", + "@logtape/logtape": "jsr:@logtape/logtape@^0.6.2", + "markdown-it": "npm:markdown-it@^14.1.0", + "preact": "https://esm.sh/preact@10.19.6", + "preact/": "https://esm.sh/preact@10.19.6/", + "scrypt": "jsr:@denorg/scrypt@4.4.4", + "sanitize-html": "npm:sanitize-html@^2.13.0", + "uuidv7": "npm:uuidv7@^1.0.0" + }, "compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" diff --git a/examples/blog/generate_import_map.ts b/examples/blog/generate_import_map.ts deleted file mode 100644 index cb574674..00000000 --- a/examples/blog/generate_import_map.ts +++ /dev/null @@ -1,13 +0,0 @@ -import fedifyManifest from "../../src/deno.json" with { type: "json" }; - -const fedifyImportMap = fedifyManifest.imports; -const blogImportMap = JSON.parse( - await Deno.readTextFile(`${import.meta.dirname}/import_map.json`), -).imports; - -const importMap = { ...fedifyImportMap, ...blogImportMap }; - -await Deno.writeTextFile( - `${import.meta.dirname}/import_map.g.json`, - JSON.stringify({ imports: importMap }, null, 2) + "\n", -); diff --git a/examples/blog/import_map.g.json b/examples/blog/import_map.g.json deleted file mode 100644 index db658bd0..00000000 --- a/examples/blog/import_map.g.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "imports": { - "@cfworker/json-schema": "npm:@cfworker/json-schema@^2.0.1", - "@david/which-runtime": "jsr:@david/which-runtime@^0.2.0", - "@deno/dnt": "jsr:@deno/dnt@0.41.2", - "@fedify/fedify": "../../src.mod.ts", - "@fedify/fedify/federation": "../../src/federation/mod.ts", - "@fedify/fedify/nodeinfo": "../../src/nodeinfo/mod.ts", - "@fedify/fedify/runtime": "../../src/runtime/mod.ts", - "@fedify/fedify/sig": "../../src/sig/mod.ts", - "@fedify/fedify/vocab": "../../src/vocab/mod.ts", - "@fedify/fedify/webfinger": "../../src/webfinger/mod.ts", - "@fedify/fedify/x/denokv": "../../src/x/denokv.ts", - "@fedify/fedify/x/fresh": "../../src/x/fresh.ts", - "@fedify/fedify/x/hono": "./x/hono.ts", - "@hongminhee/aitertools": "jsr:@hongminhee/aitertools@^0.6.0", - "@hugoalh/http-header-link": "jsr:@hugoalh/http-header-link@^1.0.2", - "@logtape/logtape": "jsr:@logtape/logtape@^0.6.2", - "@phensley/language-tag": "npm:@phensley/language-tag@^1.9.0", - "@std/assert": "jsr:@std/assert@^0.226.0", - "@std/async": "jsr:@std/async@^1.0.5", - "@std/bytes": "jsr:@std/bytes@^1.0.2", - "@std/collections": "jsr:@std/collections@^1.0.6", - "@std/encoding": "jsr:@std/encoding@^1.0.5", - "@std/fs": "jsr:@std/fs@^1.0.3", - "@std/http": "jsr:@std/http@^1.0.6", - "@std/path": "jsr:@std/path@^0.225.2", - "@std/semver": "jsr:@std/semver@^0.224.3", - "@std/testing": "jsr:@std/testing@^0.224.0", - "@std/text": "jsr:@std/text@^1.0.6", - "@std/url": "jsr:@std/url@^0.225.1", - "@std/yaml": "jsr:@std/yaml@^0.224.3", - "asn1js": "npm:asn1js@^3.0.5", - "fast-check": "npm:fast-check@^3.22.0", - "json-canon": "npm:json-canon@^1.0.1", - "jsonld": "npm:jsonld@^8.3.2", - "mock_fetch": "jsr:@hongminhee/deno-mock-fetch@^0.3.2", - "multibase": "npm:multibase@^4.0.6", - "multicodec": "npm:multicodec@^3.2.1", - "pkijs": "npm:pkijs@^3.2.4", - "uri-template-router": "npm:uri-template-router@^0.0.16", - "url-template": "npm:url-template@^3.1.1", - "$fresh/": "https://deno.land/x/fresh@1.6.8/", - "@preact/signals": "https://esm.sh/*@preact/signals@1.2.3", - "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.6.1", - "@std/dotenv/load": "jsr:@std/dotenv@^0.224.0/load", - "@std/encoding/hex": "jsr:@std/encoding@^0.224.3/hex", - "@hongminhee/x-forwarded-fetch": "jsr:@hongminhee/x-forwarded-fetch@^0.2.0", - "markdown-it": "npm:markdown-it@^14.1.0", - "preact": "https://esm.sh/preact@10.22.0", - "preact/": "https://esm.sh/preact@10.22.0/", - "scrypt": "jsr:@denorg/scrypt@4.4.4", - "sanitize-html": "npm:sanitize-html@^2.13.0", - "uuidv7": "npm:uuidv7@^1.0.0" - } -} diff --git a/examples/blog/import_map.json b/examples/blog/import_map.json deleted file mode 100644 index d9234d0a..00000000 --- a/examples/blog/import_map.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "imports": { - "$fresh/": "https://deno.land/x/fresh@1.6.8/", - "@preact/signals": "https://esm.sh/*@preact/signals@1.2.3", - "@preact/signals-core": "https://esm.sh/*@preact/signals-core@1.6.1", - "@std/dotenv/load": "jsr:@std/dotenv@^0.224.0/load", - "@std/encoding/hex": "jsr:@std/encoding@^0.224.3/hex", - "@std/path": "jsr:@std/path@^0.225.2", - "@std/semver": "jsr:@std/semver@^0.224.3", - "@fedify/fedify": "../../src.mod.ts", - "@fedify/fedify/federation": "../../src/federation/mod.ts", - "@fedify/fedify/nodeinfo": "../../src/nodeinfo/mod.ts", - "@fedify/fedify/runtime": "../../src/runtime/mod.ts", - "@fedify/fedify/sig": "../../src/sig/mod.ts", - "@fedify/fedify/vocab": "../../src/vocab/mod.ts", - "@fedify/fedify/webfinger": "../../src/webfinger/mod.ts", - "@fedify/fedify/x/fresh": "../../src/x/fresh.ts", - "@fedify/fedify/x/denokv": "../../src/x/denokv.ts", - "@hongminhee/x-forwarded-fetch": "jsr:@hongminhee/x-forwarded-fetch@^0.2.0", - "@logtape/logtape": "jsr:@logtape/logtape@^0.6.2", - "markdown-it": "npm:markdown-it@^14.1.0", - "preact": "https://esm.sh/preact@10.22.0", - "preact/": "https://esm.sh/preact@10.22.0/", - "scrypt": "jsr:@denorg/scrypt@4.4.4", - "sanitize-html": "npm:sanitize-html@^2.13.0", - "uuidv7": "npm:uuidv7@^1.0.0" - } -}