Closed janvanderhaegen closed 4 years ago
Yes, it's already setup in the new aurelia
repo. They aren't on CDN yet, but that's coming soon.
Don't suppose this has been added to a CDN in the last year?
It's not a recommended way to use a library like this. The best way would be with some bundling solution. CDN would mainly be for ease of use with things like plunkr or gist.run. It hasn't been a high priority compared to other items.
@EisenbergEffect I only want it for gist.run so I can reproduce a bug in repeat.js.
I agree it is not a big deal for actual use in Aurelia based applications. But for growth of the Aurelia ecosystem, it is very important. Easily creating plunkr, gist.run, jsfiddle demos is huge for being able to communicate about Aurelia.
Without this, it takes much longer to put together bug reports, demos, questions for stack overflow, etc. This causes friction. Friction means that fewer people do it, and that causes Aurelia to not grow as well as it could.
@EisenbergEffect, I agree with @Vaccano, that for gist.run there should be smth like CDN for Aurelia bundles. If You'd just want some specific Aurelia package without bundling, you coud use https://unpkg.com, but having all unbundled packages from there isn't ideal (and not what this issue is about).
It would be nice if there was an universial (not Aurelia specinfic) service that would create the bundle based on list of dependencies that would map to the bundle url, that could be used for example for gist.run. Sadly my googling skills didn't yield a result i hoped - if you know smth like that, let me know.
Implemenation note (perhaps someone has more time than i to implement it): passing all dependencies through url wouldn't be always possible due to url length restrictions and as JS developers use usually package.json, the service could accept desired dependencies list for bundling in package.json format. So when the service has parsed the dependencies, it could download the dependencies, build the bundle, cache it and return an unique url for the bundle to the user who requested the bundle for given dependencies. Then the url could be used for example in gist.run :)
There are two major open questions that I have about putting this up on a CDN: how do we version it? and how often do we update it? Each module is independently versioned and released. When we bundle all that up into a single package, how should that be handled?
@EisenbergEffect - According to the blog, there have been 7 releases since the first of the year. Assuming that cadence continues, that means about 15 a year. I realize that versions may change more often than that, but I think keeping the CDN version in sync with the blog sounds like a good place to start.
As for the version, I would suggest making a separate version number that is managed independently of all modules, and is attached to the CDN/Bundled code. (Something like what aurelia-bundle does now).
Depending on how it is done, this could also have a nice side effect of clearing up some of the confusion of what Aurelia module versions work with other specific module versions. (Though his is not the goal and should not be a primary consideration.)
That makes sense. I think we'll probably need some documentation to explain how that versioning will work. I think we can do this.
So, just to set some expectations on timing. I'll probably need to be the one who does this particular task. I've got a few other things on my plate. Here's what my list looks like:
These tasks will probably take me a couple of weeks, if I'm honest. Parallel to this work, I've been rebuilding our entire Aurelia site and documentation engine, so we have better SEO, among other things. Also, we're getting ready to launch a discourse. Once I get past the two tasks above, I can look at CDNing our aurelia bundle, in between the site and discourse preparations. I'm a bit anxious to get the new site out...
If you don't see this happen within the next few weeks, please ping me here again and bug me until I do it. Thanks for your patience.
@EisenbergEffect had two questions. As an alternative approach to @Vaccano proposal (that is Aurelia specific), i'll explain what i had in mind with my approach described above that could be used to bundle any JS libraries, not just for Aurelia.
how do we version it?
The approach i suggested above wouldn't use regular CDN, and versioning happens package-by package - just like in other modern JS projects based on package.json dependencies (that contain versions for each package).
how often do we update it?
With the approach i suggested above we wouldn't need to update it ourselves, anyone who needs some set of packages could upload package.json for the bundle and the bundle for that package would be created by the service.
I'm not apposed to something like that, I just don't think the Aurelia team has the bandwidth to build it now (or financing to maintain the servers).
Yay! it seems that it will be available soon at cdnjs.com (https://github.com/cdnjs/cdnjs/pull/11356)
@EisenbergEffect, Take a look at Turbo that is pretty-much what i proposed above (comment1, comment2) and probably it is even more advanced.
Some features:
- Installs packages ≥5x faster than Yarn & NPM 🔥
- Works entirely within your web browser, enabling lightning fast dev environments ⚡️
- Has multiple layers of redundancy for production grade reliability 💪
And here is another relevant quote from Turbo blog post:
we’re also excited to announce that Google’s Angular team recently chose StackBlitz to power all the live examples that millions of developers use in their docs!
Closing this issue. The aurelia-bundler
library has been superseded by the aurelia-cli.
Hey,
I was wondering if the roadmap foresees pre-bundled aurelia downloads? Perhaps even CDN distributed? @cmichaelgraham used to have a repository with aurelia & typescript bundles, and in some development workflows these were just the right scratch for our itch.
Thanks
J