Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
abernier committed Nov 15, 2024
1 parent 7ddac26 commit cec5cdc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 22 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -796,3 +796,43 @@ https://pmndrs.github.io/drei
[Documentation has moved here](https://pmndrs.github.io/drei/staging/shadow-alpha)

</details>

## Dev

### INSTALL

```sh
$ corepack enable
$ yarn install
```

### Test

#### Local

Pre-requisites:

- ```sh
$ npx playwright install
```

To run visual tests locally:

```sh
$ yarn build
$ yarn test
```

#### Docker

Or in the same environment as the CI:

```sh
$ yarn build
$ docker run --init --rm -v $(pwd):/app -w /app ghcr.io/pmndrs/playwright:drei sh -c "corepack enable && yarn install && yarn test"
```

> [!TIP]
> If running on mac m-series, you may need to add `--platform linux/arm64` to the docker command.
To update a snapshot, simply remove it and relaunch the test command.
24 changes: 2 additions & 22 deletions docs/getting-started/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ nav: -1
---

<Intro>
A growing collection of useful helpers and fully functional, ready-made abstractions for [@react-three/fiber](https://github.com/pmndrs/react-three-fiber).
A growing collection of useful helpers and fully functional, ready-made abstractions for
[@react-three/fiber](https://github.com/pmndrs/react-three-fiber).
</Intro>

[![logo](../logo.jpg)](https://codesandbox.io/s/bfplr)
Expand Down Expand Up @@ -37,24 +38,3 @@ import { PerspectiveCamera, PositionalAudio, ... } from '@react-three/drei/nativ
```

The `native` route of the library **does not** export `Html` or `Loader`. The default export of the library is `web` which **does** export `Html` and `Loader`.

## INSTALL

```sh
& corepack enable
$ yarn install
```

## Tests

To run visual tests in the same environment as the CI:

```sh
$ yarn build
$ docker run --init --rm -v $(pwd):/app -w /app ghcr.io/pmndrs/playwright:main yarn test
```

> [!TIP]
> If running on mac m-series, you may need to add `--platform linux/arm64` to the docker command.
To update a snapshot, simply remove it and relaunch the test command.

0 comments on commit cec5cdc

Please sign in to comment.