format
This commit is contained in:
parent
1f8c6bde50
commit
2c8ee29d83
32
README.md
32
README.md
|
|
@ -55,10 +55,11 @@ The `req` JSX prop will be given the `Hono` request:
|
||||||
|
|
||||||
If `_layout.tsx` exists, your pages will automatically be wrapped in it:
|
If `_layout.tsx` exists, your pages will automatically be wrapped in it:
|
||||||
|
|
||||||
export default ({ children, title }: any) =>
|
```tsx
|
||||||
|
export default ({ children, title }: any) => (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<title>{title ?? 'hype'}</title>
|
<title>{title ?? "hype"}</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
|
||||||
|
|
@ -66,11 +67,11 @@ If `_layout.tsx` exists, your pages will automatically be wrapped in it:
|
||||||
<script src="/js/main.ts" type="module"></script>
|
<script src="/js/main.ts" type="module"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>{children}</main>
|
||||||
{children}
|
|
||||||
</main>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
(Files starting with `_` don't get served directly.)
|
(Files starting with `_` don't get served directly.)
|
||||||
|
|
||||||
|
|
@ -78,18 +79,24 @@ If `_layout.tsx` exists, your pages will automatically be wrapped in it:
|
||||||
|
|
||||||
CSS can be accessed via `/css/main.css`:
|
CSS can be accessed via `/css/main.css`:
|
||||||
|
|
||||||
<link href="/css/reset.css" rel="stylesheet" />
|
```html
|
||||||
|
<link href="/css/reset.css" rel="stylesheet" />
|
||||||
|
```
|
||||||
|
|
||||||
### js
|
### js
|
||||||
|
|
||||||
JS can be accessed (and transpiled) via `/js/main.ts` or `/shared/utils.ts`:
|
JS can be accessed (and transpiled) via `/js/main.ts` or `/shared/utils.ts`:
|
||||||
|
|
||||||
<script src="/js/main.ts" type="module"></script>
|
```html
|
||||||
|
<script src="/js/main.ts" type="module"></script>
|
||||||
|
```
|
||||||
|
|
||||||
import your modules relatively, for example in `main.ts`:
|
import your modules relatively, for example in `main.ts`:
|
||||||
|
|
||||||
import { initAbout } from './about'
|
```typescript
|
||||||
import utils from './shared/utils'
|
import { initAbout } from "./about"
|
||||||
|
import utils from "./shared/utils"
|
||||||
|
```
|
||||||
|
|
||||||
### pub
|
### pub
|
||||||
|
|
||||||
|
|
@ -152,5 +159,8 @@ export default app.defaults
|
||||||
|
|
||||||
4. Enter dev mode
|
4. Enter dev mode
|
||||||
|
|
||||||
bun install
|
```sh
|
||||||
bun test
|
bun install
|
||||||
|
bun test
|
||||||
|
``
|
||||||
|
```
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user