-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[p5 web editor - examples] Updater Script #1002
Comments
Just making a note that I've started a draft here: processing/p5.js-web-editor#1627 |
Another option I wonder about: Could we download the built assets directly from Netlify through an API? Netlify does allow manual downloads of deployed assets. If we could grab it from the script, we'd be able to get all the files we need without having to make any changes. Opened a question on Netlify here: https://community.netlify.com/t/using-the-api-or-cli-to-download-a-deployed-build/25342 |
Another is that we put together a storage bucket on S3, GCP, or elsewhere and add a script to ml5 to push the example builds to, and then retrieve them from this storage source in the server-side script in the web editor. We'd probably need to pay a bit of money for this, but I imagine we'd only need it until the bulk upload API is available on the p5 web editor side. |
@bomanimc are you referring to text assets (js, css, html) or other assets? It honestly might give you some flexibility to host all of the other assets separately and then make theme CORS enabled with the web editor. Then you won't need to re-run the update script in order to update these assets. |
@catarak referencing the text assets (the html and JS files required for the examples). I agree with that strategy for the other assets though for sure. Do you have any suggestions for the text assets as well? |
For those I would upload to the web editor using the API (which I know is not yet public :/, but will be in the near future). For any updates and testing, you can use the staging editor (which I can send you when I have it functioning) |
The staging editor is now up at https://stagingeditor.p5js.org (password protected) if you'd like to test any changes to the updater script! Let me know and I'll email you the login. |
Thanks @catarak! I will take a look at this as soon as possible. May you please email the login to [email protected]? |
It looks like we've adddressed the scope of this issue! I've opened another issue on the p5.js web editor repo to share another idea about an interim process for updating the examples: processing/p5.js-web-editor#1773 |
β Step 1: Describe the issue π
With the merging of the
ml5-examples
repo to theml5-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 currentml5-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
ml5 library
points tolocalhost
and not theml5@latest
cdn URL. @bomanimc - Any thoughts on this would be superb!@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 examplesAdditional notes
The text was updated successfully, but these errors were encountered: