Closed indefinit closed 8 years ago
also, forgive my ignorance, but is there an easy way of compiling the typescript dependencies into one lib js file?
Oh, sorry, I just noticed this issue--for some reason GitHub isn't emailing me when new issues are filed or something.
Good catch! Hmmm, there are multiple ways to tackle this... let me think a bit and get back to you.
also, forgive my ignorance, but is there an easy way of compiling the typescript dependencies into one lib js file?
Hmm, I'm not quite sure what you mean--what are you trying to accomplish? Are you trying to self-host the widget on your own server, or something else?
Yea, in this specific case, I'm looking to self host all files from a GitHub. Repo and use raw git as a static file server. I use this for most of my tutorials because its quick and simple to organize from my course repo
Ah, gotcha--I've spun that off into #45!
Ok, I think I've fixed this! You can read about the new behavior here:
https://toolness.github.io/p5.js-widget/#base-url
Let me know if this works for you!
Sorry for the delayed response. Any chace base-url can work with relative paths? For example if I'm developing on localhost but push my code somewhere else, it would be great to have data-base-url="./" to map to the root directory where my index.html lives.
No worries! I Just added this in 81835aed8c28a6486d1f441a84f6c5c6bc4f2fa9.
Note, though, that if you just want the base URL to be the same path as the page you're embedding the widget in, you shouldn't have to provide data-base-url
at all.
If I'm using loadTable, loadXML, etc. functions with this widget src'ed from your github (for example):
then the data path will reference toolness.github instead of my local index. This is potentially a problem since it will likely break any user code expecting to load data from my local index, resulting in a 404. Example:
Is there an easy fix to this other than srcing the widget from my local index?