Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation notes in README #457

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,51 @@ A component to integrate [P5.js](https://p5js.org/) sketches into
> released for internal development testing ONLY. It is recommended to continue
> utilising version 4.4.0 until it is out of the `rc` versioning scheme.

## NextJS
## Installation

To install, use the following command in the format appropriate to your chosen
package manager:

```shell
[npm|yarn|pnpm] [install|add] p5 @p5-wrapper/react
```

### Peer dependencies

Please note that `p5`, `react` and `react-dom` are peer dependencies, meaning
you should ensure they are installed before installing React P5 Wrapper.

```js
"peerDependencies": {
"p5": ">= 1.4.1",
"react": ">= 18.2.0",
"react-dom": ">= 18.2.0"
},
```

### TypeScript

If you plan to use this component within a NextJS application, you should
If you would like to use Typescript, you should install `p5` types in the
development environment:

```shell
[npm|yarn|pnpm] [install|add] -D @types/p5
```

### Next.js

If you plan to use this component within a Next.js application, you should
instead use
[our NextJS dynamic implementation](https://github.com/P5-wrapper/next) instead.
To do get started, you can run:
[our Next.js dynamic implementation](https://github.com/P5-wrapper/next)
instead. To do get started, you can run:

```shell
[npm|yarn|pnpm] [install|add] p5 @p5-wrapper/next @p5-wrapper/react
```

Please continue reading these docs and also look at
[the NextJS dynamic implementation docs](https://github.com/P5-wrapper/next) for
further supporting information.
[the Next.js dynamic implementation docs](https://github.com/P5-wrapper/next)
for further supporting information.

## Demo & Examples

Expand All @@ -48,15 +79,6 @@ pnpm preview

Then just open `http://localhost:3001` in a browser.

## Installation

To install, use the following command in the format appropriate to your chosen
package manager:

```shell
[npm|yarn|pnpm] [install|add] p5 @p5-wrapper/react
```

## Usage

### Javascript
Expand Down
Loading