Skip to content

[p5 web editor - examples] Updater ScriptΒ #1002

@joeyklee

Description

@joeyklee

β†’ Step 1: Describe the issue πŸ“

Did you find a bug? Want to suggest an idea for feature?

  • devOps

With the merging of the ml5-examples repo to the ml5-library, we will need to update the script that automatically updates our examples sketches in the p5 web editor.

Right now our batch update script is run by @catarak directly on the web editor server. The script finds all of our sketches using the Github API and updates all of the content but as of now it currently points to the ml5-library repo and not our current ml5-library/examples directory.

The script in question is this one here: https://github.com/ml5js/ml5-examples/blob/release/scripts/batch-update-p5webeditor.js

Current breaking changes

  • The current implementation of the updater script traverses the ml5-examples repo an collects the p5 examples to batch upload to the p5 web editor. In updated the script to point to the ml5-examples the changes work as expected, however since we "build" our examples in our Netlify deployment and not stored here in Github, the issue arises that our ml5 library points to localhost and not the ml5@latest cdn URL. @bomanimc - Any thoughts on this would be superb!
    • Some possible solutions:
        1. regex replace the ml5 url in the updater script to enforce @latest ml5 lib cdn in the step when we download files. The upside, we don't add more files to our existing ml5-library repo. The downside is that we have to go in and add more logic to the batch upload script but probably better than storing both the dist_examples and the examples
        1. include the dist_examples in the ml5-library repo. The upside is that this is a very simple solution. The downside here is that we add a whole bunch of files to the ml5-library repo.
        1. Open to suggestions!

Additional notes

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions