Skip to content

Commit

Permalink
docs: add directions to run docs and benchmarks (#3092)
Browse files Browse the repository at this point in the history
* docs: add directions to run docs and benchmarks

* undo unneeded formatting

* Update CONTRIBUTING.md

---------

Co-authored-by: Aras Abbasi <aras.abbasi@googlemail.com>
  • Loading branch information
FatumaA and Uzlopak committed Apr 15, 2024
1 parent dadf456 commit 992e39d
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
* [Releases](#releases)
* [Update `WPTs`](#update-wpts)
* [Building for externally shared node builtins](#external-builds)
* [Benchmarks](#benchmarks
* [Documentation](#documentation)
* [Developer's Certificate of Origin 1.1](#developers-certificate-of-origin)
* [Moderation Policy](#moderation-policy)

<a id="guides"></a>
## Guides

This is a collection of guides on how to run and update `undici`, and how to run different parts of the project.

<a id="update-llhttp"></a>
### Update `llhttp`

Expand All @@ -36,6 +40,7 @@ git clone git@github.com:nodejs/llhttp.git

cd llhttp
```

#### Checkout a `llhttp` release

```bash
Expand Down Expand Up @@ -109,6 +114,7 @@ git sparse-checkout add /mimesniff
git sparse-checkout add /storage
git sparse-checkout add /service-workers
```

</details>

#### Sparse-clone the [wpt](https://github.com/web-platform-tests/wpt) repo
Expand Down Expand Up @@ -146,7 +152,6 @@ npm run test:wpt
```

<a id="lint"></a>

### Lint

```bash
Expand Down Expand Up @@ -182,6 +187,24 @@ an unbundled version instead of bundling one in `libnode.so`.
To enable this, pass `EXTERNAL_PATH=/path/to/global/node_modules/undici` to `build/wasm.js`.
You shall also pass this path to `--shared-builtin-undici/undici-path` in Node.js's `configure.py`.

<a id="benchmarks"></a>
### Benchmarks

```bash
cd benchmarks && npm i && npm run bench
```

The benchmarks will be available at `http://localhost:3042`.

<a id="documentation"></a>
### Documentation

```bash
cd docs && npm i && npm run serve
```

The documentation will be available at `http://localhost:3000`.

<a id="developers-certificate-of-origin"></a>
## Developer's Certificate of Origin 1.1

Expand Down Expand Up @@ -214,5 +237,4 @@ By making a contribution to this project, I certify that:

The [Node.js Moderation Policy] applies to this project.

[Node.js Moderation Policy]:
https://github.com/nodejs/admin/blob/main/Moderation-Policy.md
[Node.js Moderation Policy]: https://github.com/nodejs/admin/blob/main/Moderation-Policy.md

0 comments on commit 992e39d

Please sign in to comment.