processing / processing/p5.js-web-editor
Update Examples generation script to use up-to-date version
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
Description
Increasing Access
The editor makes getting started easier by surfacing examples from the main dropdown menu:
Feature enhancement details
Currently, the examples in https://editor.p5js.org/p5/sketches are built from the archive site. Instead, they should match the examples on https://p5js.org/, and include the updated attribution block as it appears on the website. (https://github.com/processing/p5.js-website/tree/main/src/content/examples or https://p5js.org/examples/)
Addressing this would include:
- Updating the script https://github.com/processing/p5.js-web-editor/blob/c5cdecbe3262bc7e193f4d0fea558039297dbfc5/server/scripts/examples.js#L33 to fetch from the accurate repository
- Optionally, if it makes more sense, add a PR to p5.js-website that introduces a machine readable json version of the examples. For example, the p5.js-website provides https://p5js.org/reference/data.json - so a new machine readable resource could be added as "https://p5js.org/examples/data.json"
- In any case: the updated script should use the version of the example that corresponds to the current main site. This way, when we switch to p5.js v2, it is easy to update the examples to match all the v2 updates
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.
Research direction
Start with server/scripts/examples.js around the referenced fetch logic, then compare the current examples in the p5.js website repository and its data.json pattern. Determine which source can provide the current examples and attribution block, and update the generation flow so its output matches the main site and can be updated for p5.js v2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100