2022-07-23 02:46:20 +02:00
|
|
|
# Contribution Guide
|
|
|
|
|
2023-02-12 22:30:57 +01:00
|
|
|
Contributions Welcome! We will be glad for your help.
|
2022-07-23 02:46:20 +02:00
|
|
|
You can contribute in the following ways.
|
|
|
|
|
|
|
|
- Create an Issue - Propose a new feature. Report a bug.
|
|
|
|
- Pull Request - Fix a bug and typo. Refactor the code.
|
|
|
|
- Create third-party middleware - Instruct below.
|
2024-09-01 10:53:56 +02:00
|
|
|
- Share - Share your thoughts on the Blog, X, and others.
|
2022-07-23 02:46:20 +02:00
|
|
|
- Make your application - Please try to use Hono.
|
|
|
|
|
|
|
|
Note:
|
|
|
|
This project is started by Yusuke Wada ([@yusukebe](https://github.com/yusukebe)) for the hobby proposal.
|
|
|
|
It was just for fun. For now, this stance has not been changed basically.
|
|
|
|
I want to write the code as I like.
|
|
|
|
So, if you propose great ideas, but I do not appropriate them, the idea may not be accepted.
|
2022-10-23 00:01:04 +02:00
|
|
|
|
|
|
|
Although, don't worry!
|
|
|
|
Hono is tested well, polished by the contributors, and used by many developers. And I'll try my best to make Hono cool, beautiful, and ultrafast.
|
2022-07-23 02:46:20 +02:00
|
|
|
|
2024-01-29 15:38:30 +01:00
|
|
|
## Installing dependencies
|
|
|
|
|
|
|
|
The `honojs/hono` project uses [Bun](https://bun.sh/) as its package manager. Developers should install Bun.
|
|
|
|
|
|
|
|
After that, please install the dependency environment.
|
|
|
|
|
2024-05-30 06:07:09 +02:00
|
|
|
```bash
|
2024-01-29 15:38:30 +01:00
|
|
|
bun install
|
|
|
|
```
|
|
|
|
|
|
|
|
If you can't do that, there is also a `yarn.lock` file, so you can do the same with the `yarn` command.
|
|
|
|
|
2024-05-30 06:07:09 +02:00
|
|
|
```bash
|
2024-01-29 15:38:30 +01:00
|
|
|
yarn install --frozen-lockfile
|
|
|
|
```
|
|
|
|
|
2023-02-12 22:30:57 +01:00
|
|
|
## PRs
|
|
|
|
|
2024-05-24 10:47:28 +02:00
|
|
|
Please ensure your PR passes tests with `bun run test` or `yarn test`.
|
2023-02-12 22:30:57 +01:00
|
|
|
|
2022-07-23 02:46:20 +02:00
|
|
|
## Third-party middleware
|
|
|
|
|
2022-10-23 00:01:04 +02:00
|
|
|
Third-party middleware is not in the core.
|
|
|
|
It is allowed to depend on other libraries or work only in specific environments, such as only Cloudflare Workers. For examples:
|
2022-07-23 02:46:20 +02:00
|
|
|
|
|
|
|
- GraphQL Server middleware
|
|
|
|
- Firebase Auth middleware
|
2022-10-23 00:01:04 +02:00
|
|
|
- Sentry middleware
|
2022-07-23 02:46:20 +02:00
|
|
|
|
2022-10-23 00:01:04 +02:00
|
|
|
You can make a third-party middleware by yourself.
|
|
|
|
It may be under the "honojs organization" and distributed in the `@honojs` namespace.
|
2022-07-23 02:46:20 +02:00
|
|
|
|
2022-10-23 00:01:04 +02:00
|
|
|
The monorepo "[honojs/middleware](https://github.com/honojs/middleware)" manages these middleware.
|
|
|
|
If you want to do it, create the issue about your middleware.
|
2024-01-28 14:32:51 +01:00
|
|
|
|
|
|
|
## Local Development
|
|
|
|
|
2024-05-30 06:07:09 +02:00
|
|
|
```bash
|
2024-02-17 00:19:14 +01:00
|
|
|
git clone git@github.com:honojs/hono.git && cd hono/.devcontainer && yarn install --frozen-lockfile
|
2024-01-28 14:32:51 +01:00
|
|
|
docker compose up -d --build
|
|
|
|
docker compose exec hono bash
|
2024-05-24 10:47:28 +02:00
|
|
|
```
|