Availability of Better-dom on a CDN
natedsaint opened this issue · 13 comments
Note: There's no way for me (as a non-contributor) to mark this as more of an "enhancement request" in github, so I'm just creating an issue here. Feel free to close it if this is an inappropriate request.
I'm comfortable with using bower to generate the actual code from the github repo for my local projects, but one thing I've been looking into is just quickly creating experiments throughout the day using tools like codepen.io. Because of this, I debated ways to use just the code I need as an include (as you can see on codepen, you can very quickly use existing libraries or include a sample path yourself). Is there any plan to put better-dom on a CDN like cdnjs or something similar? The non-legacy version could be quickly added as a single file, I think, though I may be missing some understanding of the steps required during your build process.
Hi,
I agree it will be valuable to host the library on a CDN. I looked at the cdnjs and it seems like it uses npm to fetch new versions. Therefore some amount of work should be done to verify better-dom on node.js environment and then to publish it.
On the other hand for experiments you can use rawgithub. For an URL example check one of the jsperf tests (http://jsperf.com/dom-create-vs-jquery/26 for instance). Hope it will work for you.
Ah! Apparently I was using the wrong link from raw (raw.github as opposed to rawgithub), it was sending a header of text/html. I've copied your link, and it seems to work fine! I'd like to contribute to this project, so I'll look into getting it on node.js and seeing if npm's package.json format will work out with this codebase and get back to you.
Great. Right now I'm quite busy with working on 1.7.3, so I'll appreciate your help. The priority of the task is minor, so it can be included into either 1.7.* or 1.8 release.
Several recommendations for the task:
- start from learning what changes were made in jQuery 2 to achieve the same goal
- use jsdom as an in-memory DOM implementation for the node.js
- the goal will be to pass all tests, I usually use
grunt dev
orgrunt test
to check them, but you'll have to made some adaptation of the karma's task to run it in the node.js environment - as the last step will be publishing a new version in NPM automatically as soon as a new version arrives. I can help with that
jsdelivr http://www.jsdelivr.com/ is a fantasic CDN started by Mozilla. It's killer feature is that you can actually request multiple libraries in a single request, mitigating the # 1 downside of using a cdn on high-latency networks. I currently am the designated gopher to keep Vue.js up-to-date in jsdelivr. I would happily volunteer to do the same for better-dom (it's very quick and easy)
@lithiumjake I don't mind, go ahead with publishing better-dom on jsdelivr. It's only make sense to put better-dom.js
and better-dom-legacy.js
- the better-dom-legacy.htc
should be on the same domain as the website that uses it.
DOH! thanks for pointing that out. I read about it on hacker news as "from Mozilla", it was on Mozilla's website, so my confusion wasn't entirely unfounded :)
I ran into a snag putting better-dom on jsdelivr. They require the files to be minified, and I discovered that the files in the /dist directory are not. If you want to add that step to your rather impressive build system, I'll get it on jsdelivr, and keep it up to date.
Well, you can create minified files by yourself using the command below:
grunt build uglify
It will create better-dom.min.js
+ better-dom.min.map
and better-dom-legacy.min.js
+ better-dom-legacy.min.map
in the build
folder that you should put at jsdelivr.
I'll add minified files into the dist
folder starting from the next version.
Okay, I am watching your repo. If you add minified files, I will add them to jsdelivr. No pressure, just an offer to help :) I wouldn't feel comfortable using non-canonical files.
version 1.7.5 is out today, and I've added *.min
files into the dist
folder as well
I've been busy with other projects and haven't gotten a chance to nodify everything and get it into npm, but I've been working on some other grunt stuff so I might be able to get to it next week. I'll give you progress update ASAP.
The library added to jsdelivr CDN.
AWESOME! =D
Thanks to this I might be using this on a side-project again soon.
Great! thanks!