From f62366c85a5800704e75930e4e41b5856f238fec Mon Sep 17 00:00:00 2001 From: m1sk9 Date: Thu, 15 Feb 2024 02:01:46 +0900 Subject: [PATCH] deps: replace import-map --- deno.json | 15 ++++++++++----- src/main.ts => main.ts | 3 ++- src/deps.ts | 2 -- 3 files changed, 12 insertions(+), 8 deletions(-) rename src/main.ts => main.ts (89%) delete mode 100644 src/deps.ts diff --git a/deno.json b/deno.json index 3270bc2..dc1091f 100644 --- a/deno.json +++ b/deno.json @@ -1,14 +1,19 @@ { "tasks": { - "start": "deno run --allow-net --allow-read src/main.ts", - "dev": "deno run --watch --allow-net --allow-read src/main.ts", - "cache": "deno cache src/deps.ts", - "check": "deno check src/main.ts", + "start": "deno run --allow-net --allow-read main.ts", + "dev": "deno run --watch --allow-net --allow-read main.ts", + "cache": "deno cache deps.ts", + "check": "deno check main.ts", "fmt": "deno fmt --watch .", "fmt:check": "deno fmt --check", "lint": "deno lint" }, "fmt": { - "singleQuote": true + "singleQuote": true, + "semiColons": true + }, + "imports": { + "hono/mod": "https://deno.land/x/hono@v3.7.6/mod.ts", + "hono/middleware": "https://deno.land/x/hono@v3.7.6/middleware.ts" } } diff --git a/src/main.ts b/main.ts similarity index 89% rename from src/main.ts rename to main.ts index 9ce5e5d..49cb4b9 100644 --- a/src/main.ts +++ b/main.ts @@ -1,4 +1,5 @@ -import { Hono, logger, poweredBy } from './deps.ts'; +import { Hono } from 'hono/mod'; +import { logger, poweredBy } from 'hono/middleware'; const app = new Hono(); diff --git a/src/deps.ts b/src/deps.ts deleted file mode 100644 index c737cd4..0000000 --- a/src/deps.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from 'https://deno.land/x/hono@v3.7.6/mod.ts'; -export * from 'https://deno.land/x/hono@v3.7.6/middleware.ts';