Add document about the v2 reference-generation process#8509
Add document about the v2 reference-generation process#8509nbogie wants to merge 7 commits intoprocessing:dev-2.0from
Conversation
|
If necessary/useful, I can raise a separate PR for the documentation of the type-generation process. (Until today i was writing them up in the same document.) |
016ccef to
13d5fa9
Compare
There was a problem hiding this comment.
Nice, thank you! cc @perminder-17 @davepagurek @doradocodes
|
|
||
| ## Need to know? | ||
|
|
||
| You don't need to know _any_ of this to successfully write and maintain the reference comments in the p5.js library! If you've questions about that, see [Contributing to the p5.js reference](./contributing_to_the_p5js_reference.md). |
There was a problem hiding this comment.
Minor: I think this is a good first paragraph for the doc overall?
|
|
||
| You don't need to know _any_ of this to successfully write and maintain the reference comments in the p5.js library! If you've questions about that, see [Contributing to the p5.js reference](./contributing_to_the_p5js_reference.md). | ||
|
|
||
| Warning: This describes how things work in April 2026 and is quite likely out of date! |
There was a problem hiding this comment.
Maybe state that this works as of april 2026, but link to the scripts being described. I know they're linked below but just for clarity of, "if this is out of date, please consult source of truth here"
|
|
||
| You can run it locally and observe the outputs. | ||
|
|
||
| It is currently run by [a release process workflow](../.github/workflows/release-workflow-v2.yml) on Github Actions CI. |
There was a problem hiding this comment.
Absolute link probably needed because these docs will end up on the website where relative link will feel broken
|
|
||
| \* The convert script has _also_ generated `/docs/parameterData.json` which is used by the friendly error system (FES) at runtime to validate function parameters. We won't discuss that further here. | ||
|
|
||
| #### Excerpt of /docs/reference.data.json |
There was a problem hiding this comment.
Small typo I think:
| #### Excerpt of /docs/reference.data.json | |
| #### Excerpt of /docs/reference/data.json |
davepagurek
left a comment
There was a problem hiding this comment.
This looks great @nbogie!
perminder-17
left a comment
There was a problem hiding this comment.
Looks good to me @nbogie
* list key scripts up front * bring "do you need to know this?" earlier * absolute links to relevant source docs throughout add end section on contributing to this document
1061b8e to
22679a8
Compare
|
Thanks all!
|
ksen0
left a comment
There was a problem hiding this comment.
Hi @nbogie ! I just spotted a couple of super minor things. I'll be making the RC in a couple of days and I'll merge this into that. I can apply the one type fix needed if you don't have time to touch it before then. Thanks again for all your work on fleshing out these docs!
| The process described in this document does not apply to the types for the p5 v1 library. There are (often out-of-date) types at [definitely-typed](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/p5), packaged to npm as @types/p5. This document only discusses the types for p5 v2. | ||
|
|
||
|
|
||
| ## Aside: "Why not just do X... |
|
|
||
| #### Summary: | ||
|
|
||
| Loads the generated `./docs/reference/data.json` |
There was a problem hiding this comment.
I didn't run this locally but I'd imagine this should be a list but wouldn't show up as one? Feel free to ignore if I'm wrong
There was a problem hiding this comment.
Good spot, either I meant that or certainly it reads better as a list. I added a little to emphasise that this was the end of the focused flow, and to list briefly what will consume the MDX files downstream.
|
|
||
| ## Need to know? | ||
|
|
||
| You don't need to know _any_ of this to successfully write and maintain the reference comments in the p5.js library! If you've questions about that, see [Contributing to the p5.js reference](./contributing_to_the_p5js_reference.md). |
|
Incorporated typo + formatting corrections, thanks Kit! |
Fixes #8508
Changes:
Adds two new documents, makes no other changes.
I've tried to add a little colour to the flow diagram to help distinguish between actions which run in p5.js repo versus p5.js-website repo. However, we're at the mercy of the css that just inverts the mermaid diagram colours to get dark mode. Happy to resort to no extra colour if preferred.