update readme

This commit is contained in:
Chris Wanstrath 2025-11-30 12:10:07 -08:00
parent 30c1f4b894
commit 31a4fc2a32

View File

@ -91,8 +91,8 @@ export default ({ children, title }: any) => (
To use pico.css with the default layout, create `Hype` with `{ pico: true }`:
`````typescript
import { Hype } from 'hype'
```typescript
import { Hype } from "hype"
const app = new Hype({ pico: true })
```
@ -132,7 +132,6 @@ Install the `vscode-styled-components` VSCode extension to highlight inline `css
### css reset
To use reset.css with the default layout, create `Hype` with `{ reset: true }`:
````typescript
@ -144,7 +143,7 @@ You can also use the css reset in your custom layouts:
```html
<link href="/css/reset.css" rel="stylesheet" />
```
````
### js
@ -209,12 +208,18 @@ Anything in `pub/` is served as-is. Simple stuff.
## Setup
0. Add the dependency to your project:
```sh
bun add git+https://git.nose.space/defunkt/hype
```
1. Add `dev` and `start` to `package.json`:
```json
"scripts": {
"start": "bun run src/server.tsx",
"dev": "bun run --hot src/server.tsx"
"start": "bun run index.ts",
"dev": "bun run --hot index.ts"
},
```
@ -250,7 +255,7 @@ Anything in `pub/` is served as-is. Simple stuff.
}
```
3. Use `Hype` just like `Hono` in your `server.tsx`, exporting `app.defaults`:
3. Use `Hype` just like `Hono` in your `index.tsx`, exporting `app.defaults`:
```typescript
import { Hype } from "hype"
@ -266,6 +271,5 @@ export default app.defaults
```sh
bun install
bun test
bun dev
```
`````