Distributing custom builds
Open
@limzykenneth is already working on this.
Since Aug 18, 2025.
Discussion
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Topic
One of the things we designed into p5 2.0 was a module structure so that it would be possible to built p5 without, for example, the WebGL module at all. Although this system is in place, we still haven't decided how best to give that functionality to users.
Some ideas:
- We could package (minified?) versions of each module, so that you could have a multi-file p5 setup, and easily comment out the script tags for the ones you don't need
- These could be toggled on and off in something like the p5 web editor's version picker ui (cc @raclim, if you have any thoughts!)
- We could make a script in the p5 repo where you specify which modules to include (or which to omit?) and then document that process somewhere
- We could maybe provide a web tool to do the above for you, e.g. on the download page on the p5 site. We could give you some checkboxes for modules to include, and then make a build for you that includes those.
- Depending on how many options there are, we could pre-compute all of these at publish time so that each combination maps to a jsdelivr URL
- If that's not feasible, we maybe have to do a build for you, which could mean having a serverside thing for this, which has other costs to consider
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.