Skip to content

Commit 4bb86cf

Browse files
committed
docs: Update reference generation instructions to p5.js 2.0 fork workflow
1 parent 3b976bb commit 4bb86cf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/content/contributor-docs/en/contributing_to_the_p5js_reference.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -380,22 +380,22 @@ Class constructors are defined with the `@class` tag and the `@constructor` tag.
380380

381381
The p5.js repository is set up so that you can generate and preview the reference without needing to build and run the p5.js website as well.
382382

383-
* The main command to generate the reference from the reference comments in the source code is to run the following command.
383+
To do so, make sure you have committed your changes to a branch of your fork of p5.js.
384+
385+
* Then, in the p5.js-website repo, run the following command, using the URL of your fork of p5 before the `#`, and the name of your branch after the `#`:
384386

385387
```
386-
npm run docs
388+
npm run custom:dev https://github.com/yourUsername/p5.js.git#yourBranch
387389
```
388390

389-
This will generate the necessary preview files and the main `docs/reference/data.json` file, which is the same file (after minification) that will be used to render the reference page on the website.
391+
This will build the reference from your branch and start a development preview of the website. A URL will be logged in the console that you can go to in your browser to test out your changes.
390392

391-
* For continuous work on the reference, you can run the following command.
393+
* When you're done, you can run this command to reset your changes:
392394

393395
```
394-
npm run docs:dev
396+
npm run custom:cleanup
395397
```
396398

397-
This will launch a live preview of the rendered reference that will update each time you make changes (you will need to refresh the page after making changes to see them appear). This is useful, especially for previewing example code running in the browser.
398-
399399
* The main template files are stored in the `docs/` folder and, in most cases, you should not make changes directly to files in this folder, except to add new asset files in the `docs/yuidoc-p5-theme/assets` folder.
400400

401401
## Next steps

0 commit comments

Comments
 (0)