Open shiffman opened 8 years ago
it is here right now: https://github.com/processing/p5.js-website/blob/master/src/data/download.json I don't think this is the right spot...I'm in the middle of some website restructuring. but you could use this link for now and I can submit a PR with the updated one if it moves.
I noticed that the version file is now at https://github.com/processing/p5.js-website/blob/master/dist/download/version.json, though it's not up to date. Are you just updating that file manually? Would it make more sense to do something like what the website does (https://github.com/processing/p5.js-website/blob/79996764cbff284ae9e8a589065c8cae35949d0b/dist/download/release.php#L30)?
here's the up to date file to link to: http://p5js.org/download/version.json
it is updated automatically, I think something just got messed up with the git management where an old version of it got cached in the github repo. thanks for catching it!
Maybe it is just me but I am getting a 404 error for that link.
ugh I tried to fix the github and deleted the file! should be back now. sorry 😁
no worries!
When new project button clicked, we check "version"
from here and update p5.js version referenced in index.html
@catarak Does this plan sound good?
makes sense to me! because of CORS this might need to be added to the API and then the API makes the request. i think this also needs to happen when a user navigates to /
(which is the same as creating a new sketch, right?)
p5.js version referenced in index.html
@catarak Sorry, I'm a bit confused. Which index.html
are you guys referring here? Is it the root index.html
? I don't see any p5.js version already referenced as per the original post in the issue.
the one included in each sketch—if you open the sidebar you can view it!
Oh damn! I always miss this mysteriously hidden menu. :sweat_smile:
the ui isn't super clear right now—see #4 for a bit of discussion about this, and #389.
i think i actually have figured out a solution for this issue! the p5.js version could be an environment variable (storied in the Kubernetes secret) which gets set via a cron job which checks the version url, once a day probably. that sounds like i said a lot of buzzwords but it is a real solution.
😄 👍 Looking for latest p5.sound.min.js
for an upcoming workshop, to get the latest fix in https://github.com/processing/p5.js-sound/pull/322 (current is /*! p5.sound.min.js v0.3.7 2018-01-19 */
)
(Update: i realize this is probably just the version from when I originally generated the sketch!)
So, linking to one of these from index.html
for now: https://cdnjs.com/libraries/p5.js
But also would this be something we could just auto-generate or substitute into one of these sections?
maybe this section. One thing I'm thinking though, is that once this file is generated (say in an old sketch), you basically have to update the index.html manually.
I didn't see an option in the CDN link, but is there any way to point at a js file with https://semver.org-style versioning? Like, ideally:
https://cdnjs.cloudflare.com/ajax/libs/p5.js/^0.8.0/addons/p5.sound.js
OK, this is just pie in the sky, but thanks everyone!
@jywarren semver version would be so cool! i think we are on the same page—i would like to write a script that updates an env variable, which would insert the latest p5 version into the snippet of code you put above. i don't think it should update existing sketches, to prevent breaking changes. maybe, with future library management system, there could be a GUI for users to update their p5 version for a sketch.
Cool! Yes. This seems like a good way forward. I could imagine a system too where we could use a replace-able $VARIABLE in the saved index.html, but it'd be fragile and also not at all how the web works (perhaps slightly sadly... HTML variables anyone?). Or... a way to pattern match and replace the full CDN paths.. but again, fragile and once it breaks it's very hard for people to untangle. Better avoid magic solutions, i guess.
Thanks!
On Tue, Apr 16, 2019 at 6:00 PM Cassie Tarakajian notifications@github.com wrote:
@jywarren https://github.com/jywarren semver version would be so cool! i think we are on the same page—i would like to write a script that updates an env variable, which would insert the latest p5 version into the snippet of code you put above. i don't think it should update existing sketches, to prevent breaking changes. maybe, with future library management system, there could be a GUI for users to update their p5 version for a sketch.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/processing/p5.js-web-editor/issues/144#issuecomment-483859954, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJw0zD_q9WJIsQFYSNL4RbuO6XKyyks5vhkfSgaJpZM4KVMup .
@catarak @lmccart and I discussed this on a call yesterday. At some point in the future we'd like to have a library management system (#4), but for now we need a simple way to keep the p5.js version referenced in
index.html
up-to-date. We would not changeindex.html
in existing projects (or "duplicated" projects) but would simply use the currentp5.js
version (0.5.4 at the time of filing this issue) whenever a "new" project is created.@lmccart can you remind us what the url is to check the current p5 version? It could be checked something like once a day or each time "new" is clicked.
Did I get this right?