@ryankirkman , @thomasdavis , etc.
I'd like to add my XRegExp v2.0.0 library to cdnJS (I'll be sending a pull request after getting feedback on this issue). However, because of its collection of addons, there are a lot of associated script files. The most popular of them (listed with their paths in the XRegExp repo) are as follows:
The remaining scripts are:
Would it be OK to add all of these? I'm thinking that for cdnJS I'd flatten the directory structure and simply include all of the the above scripts in an ajax/libs/xregexp/2.0.0/ directory.
Is including the individual XRegExp addons overkill for cdnJS? If so, perhaps I could just add xregexp-min.js and xregexp-all-min.js.
Hi Steven, it's fine to add all of those scripts. I would suggest concatenating the additional scripts if it makes sense to.
The reason is that the browser needs to open an additional connection to retrieve each of those resources. Page load times will be decreased, significantly so for mobile devices.
The other reason is that it simplifies using your library. I'd much rather copy 1 or 2 script tags into my page than 5 or 10.
Good to hear. I'll submit a pull request with all the scripts, shortly.
As for concatenating the scripts, that's what xregexp-all.js (and the minified copy, xregexp-all-min.js) does. :-) It includes XRegExp bundled with all addons except backcompat.js (which is only used for backward compatibility with XRegExp v1.x.x).
Thanks for the quick feedback.