-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
yossydev
committed
Feb 23, 2024
1 parent
c53d1b3
commit f8ec74a
Showing
10 changed files
with
91 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
es6: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
sourceType: "module", | ||
ecmaVersion: 2019, // Node.js 12の場合は2019、他のバージョンのNode.jsを利用している場合は場合は適宜変更する | ||
project: ["tsconfig.eslint.json"], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
], | ||
rules: { | ||
"@typescript-eslint/no-floating-promises": "off", | ||
}, | ||
root: true, | ||
env: { | ||
es6: true, | ||
node: true, | ||
}, | ||
parserOptions: { | ||
parser: "@typescript-eslint/parser", | ||
sourceType: "module", | ||
ecmaVersion: 2019, // Node.js 12の場合は2019、他のバージョンのNode.jsを利用している場合は場合は適宜変更する | ||
project: ["tsconfig.eslint.json"], | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ["@typescript-eslint"], | ||
extends: [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
], | ||
rules: { | ||
"@typescript-eslint/no-floating-promises": "off", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import {} from "hono"; | ||
|
||
type Head = { | ||
title?: string; | ||
title?: string; | ||
}; | ||
|
||
declare module "hono" { | ||
interface Env { | ||
Variables: {}; | ||
Bindings: {}; | ||
} | ||
interface ContextRenderer { | ||
( | ||
content: string | Promise<string>, | ||
head?: Head, | ||
): Response | Promise<Response>; | ||
} | ||
interface Env { | ||
Variables: {}; | ||
Bindings: {}; | ||
} | ||
interface ContextRenderer { | ||
( | ||
content: string | Promise<string>, | ||
head?: Head, | ||
): Response | Promise<Response>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import { useState } from 'hono/jsx' | ||
import { useState } from "hono/jsx"; | ||
|
||
export default function Counter() { | ||
const [count, setCount] = useState(0) | ||
return ( | ||
<div> | ||
<p>{count}</p> | ||
<button onClick={() => setCount(count + 1)}>Increment</button> | ||
</div> | ||
) | ||
const [count, setCount] = useState(0); | ||
return ( | ||
<div> | ||
<p>{count}</p> | ||
<button onClick={() => setCount(count + 1)}>Increment</button> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { Style } from 'hono/css' | ||
import { jsxRenderer } from 'hono/jsx-renderer' | ||
import { Script } from 'honox/server' | ||
import { Style } from "hono/css"; | ||
import { jsxRenderer } from "hono/jsx-renderer"; | ||
import { Script } from "honox/server"; | ||
|
||
export default jsxRenderer(({ children, title }) => { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>{title}</title> | ||
<Script src="/app/client.ts" async /> | ||
<Style /> | ||
</head> | ||
<body>{children}</body> | ||
</html> | ||
) | ||
}) | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>{title}</title> | ||
<Script src="/app/client.ts" async /> | ||
<Style /> | ||
</head> | ||
<body>{children}</body> | ||
</html> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { showRoutes } from 'hono/dev' | ||
import { createApp } from 'honox/server' | ||
import { showRoutes } from "hono/dev"; | ||
import { createApp } from "honox/server"; | ||
|
||
const app = createApp() | ||
const app = createApp(); | ||
|
||
showRoutes(app) | ||
showRoutes(app); | ||
|
||
export default app | ||
export default app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
} | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
export default { | ||
content: ["./app/**/*.{js,ts,jsx,tsx}"], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
content: ["./app/**/*.{js,ts,jsx,tsx}"], | ||
theme: { | ||
extend: {}, | ||
}, | ||
plugins: [], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"include": ["./app/"], | ||
"exclude": ["node_modules"] | ||
"extends": "./tsconfig.json", | ||
"include": ["./app/"], | ||
"exclude": ["node_modules"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters