{"id":24017629,"url":"https://github.com/cotyhamilton/deno-honox","last_synced_at":"2026-05-04T18:38:24.406Z","repository":{"id":270522373,"uuid":"865199298","full_name":"cotyhamilton/deno-honox","owner":"cotyhamilton","description":"Deno + HonoX","archived":false,"fork":false,"pushed_at":"2025-02-03T03:25:20.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T04:25:15.807Z","etag":null,"topics":["deno","hono","honox"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cotyhamilton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-30T06:36:42.000Z","updated_at":"2025-02-03T03:25:24.000Z","dependencies_parsed_at":"2024-12-31T23:30:00.075Z","dependency_job_id":"8151f878-ee87-42eb-8093-a64043cf8cba","html_url":"https://github.com/cotyhamilton/deno-honox","commit_stats":null,"previous_names":["cotyhamilton/deno-honox"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotyhamilton%2Fdeno-honox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotyhamilton%2Fdeno-honox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotyhamilton%2Fdeno-honox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotyhamilton%2Fdeno-honox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cotyhamilton","download_url":"https://codeload.github.com/cotyhamilton/deno-honox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240746841,"owners_count":19850993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","hono","honox"],"created_at":"2025-01-08T09:42:20.877Z","updated_at":"2026-05-04T18:38:24.351Z","avatar_url":"https://github.com/cotyhamilton.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deno + honox\n\n## how to\n\n[Deno 2](https://deno.com/blog/v2.0-release-candidate) is required\n\n```bash\ndeno upgrade\ndeno upgrade rc\n```\n\nCreate [honox project](https://github.com/honojs/honox)\n\n```bash\nmkdir deno-honox\ncd deno-honox\ndeno run -A npm:create-hono\n# ? Target directory .\n# ? Which template do you want to use? x-basic\n# ? Do you want to install project dependencies? no\n```\n\nCleanup\n\n```bash\nrm package.json tsconfig.json wrangler.toml\ndeno fmt\n```\n\nInstall dependencies\n\n```bash\ndeno add \\\n    npm:hono \\\n    npm:honox \\\n    npm:@hono/vite-build \\\n    npm:@hono/vite-dev-server \\\n    npm:vite\n```\n\nUpdate `deno.json`\n\n```diff\n{\n+   \"tasks\": {\n+     \"dev\": \"vite\",\n+     \"build\": \"vite build --mode client \u0026\u0026 vite build\",\n+     \"preview\": \"(cd dist \u0026\u0026 deno serve -R index.js)\"\n+   },\n  \"imports\": {\n    \"@hono/vite-build\": \"npm:@hono/vite-build@^1.1.0\",\n    \"@hono/vite-dev-server\": \"npm:@hono/vite-dev-server@^0.16.0\",\n    \"hono\": \"npm:hono@^4.6.3\",\n    \"honox\": \"npm:honox@^0.1.25\",\n    \"vite\": \"npm:vite@^5.4.8\"\n-   }\n+   },\n+   \"exclude\": [\n+     \"dist\"\n+   ],\n+   \"nodeModulesDir\": \"auto\",\n+   \"compilerOptions\": {\n+     \"lib\": [\n+       \"esnext\",\n+       \"dom\",\n+       \"deno.ns\",\n+       \"deno.unstable\"\n+     ],\n+     \"jsx\": \"react-jsx\",\n+     \"jsxImportSource\": \"hono/jsx\"\n+   }\n}\n```\n\nUpdate `vite.config.ts`\n\n```diff\n- import build from \"@hono/vite-build/cloudflare-pages\";\n+ import build from \"@hono/vite-build/deno\";\n- import adapter from \"@hono/vite-dev-server/cloudflare\";\n+ import adapter from \"@hono/vite-dev-server/node\";\nimport honox from \"honox/vite\";\nimport { defineConfig } from \"vite\";\n\nexport default defineConfig({\n+   cacheDir: \"node_modules/.vite\",\n+   esbuild: {\n+     jsx: \"automatic\",\n+     jsxImportSource: \"hono/jsx\",\n+   },\n  plugins: [honox({ devServer: { adapter } }), build()],\n});\n```\n\nUpdate demo (`app/routes/index.tsx`)\n\n```diff\nimport { css } from \"hono/css\";\nimport { createRoute } from \"honox/factory\";\n- import Counter from \"../islands/counter\";\n+ import Counter from \"../islands/counter.tsx\";\n```\n\n### optional\n\nAdd tailwindcss\n\n```bash\ndeno add \\\n  npm:tailwindcss \\\n  npm:postcss \\\n  npm:autoprefixer\ndeno run -A npm:tailwindcss init -p --esm --ts\n```\n\nUpdate `tailwind.config.ts`\n\n```diff\nimport type { Config } from \"tailwindcss\";\n\nexport default {\n-  content: [],\n+  content: [\"./app/**/*.{ts,tsx}\"],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n} satisfies Config;\n```\n\nAdd `app/app.css`\n\n```css\n@tailwind base;\n@tailwind components;\n@tailwind utilities;\n```\n\nUpdate `app/client.ts`\n\n```diff\nimport { createClient } from \"honox/client\";\n+ import \"./app.css\"\n\ncreateClient();\n```\n\nUpdate `app/routes/index.tsx`\n\n```diff\n- import { css } from \"hono/css\";\nimport { createRoute } from \"honox/factory\";\nimport Counter from \"../islands/counter.tsx\";\n\n- const className = css`\n-   font-family: sans-serif;\n- `;\n\nexport default createRoute((c) =\u003e {\n  const name = c.req.query(\"name\") ?? \"Hono\";\n  return c.render(\n-     \u003cdiv class={className}\u003e\n+     \u003cdiv\u003e\n-       \u003ch1\u003eHello, {name}!\u003c/h1\u003e\n+       \u003ch1 class=\"text-2xl font-bold\"\u003eHello, {name}!\u003c/h1\u003e\n      \u003cCounter /\u003e\n    \u003c/div\u003e,\n    { title: name },\n  );\n});\n```\n\nUpdate `app/routes/_renderer.tsx`\n\n```diff\n- import { Link } from \"honox/server\";\n+ import { Link, Script } from \"honox/server\";\n...\n\u003clink rel=\"icon\" href=\"/favicon.ico\" /\u003e\n+ \u003cLink href=\"/app/app.css\" rel=\"stylesheet\" /\u003e\n\u003cScript src=\"/app/client.ts\" async /\u003e\n```\n\nUpdate `vite.config.ts`\n\n```diff\n- plugins: [honox({ devServer: { adapter } }), build()],\n+ plugins: [\n+   honox({\n+     client: {\n+       input: [\"/app/app.css\"],\n+     },\n+     devServer: { adapter },\n+   }),\n+   build(),\n+ ],\n```\n\n## dev\n\nInstall dependencies\n\n```bash\ndeno install\n```\n\nDev\n\n```bash\ndeno task dev\n```\n\nBuild\n\n```bash\ndeno task build\n```\n\nPreview\n\n```bash\ndeno task preview\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotyhamilton%2Fdeno-honox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcotyhamilton%2Fdeno-honox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotyhamilton%2Fdeno-honox/lists"}