-
Notifications
You must be signed in to change notification settings - Fork 907
Closed
processing/p5.js-web-editor
#1762Description
β 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 librarypoints tolocalhostand not theml5@latestcdn URL. @bomanimc - Any thoughts on this would be superb!- Some possible solutions:
-
- regex replace the ml5 url in the updater script to enforce
@latestml5 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
- regex replace the ml5 url in the updater script to enforce
-
- 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.
-
- Open to suggestions!
-
- Some possible solutions:
Additional notes
- Github will be deprecating the auth_token as a URL parameter, so we will need to update the request style according to the notes given here: https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/