CDN request: 1) option w/o styling 2) just styling
CDN request: 1) option w/o styling 2) just styling
We will be migrating our dataTables from one type of styling framework to another, with some period of time needing both -- such that 1 styling would be used on some pages & the 2nd styling used on other pages.
It would be great if your CDN builder could provide an option to "minify and/or concat" all the CSS/JS related to just the base code (with no styling framework code at all).
Then an option to "minify and/or concat" only the files related to a specific styling framework.
That way, we could automatically include the base dataTables code. Then, based on the page template being used, also include the appropriate styling framework code. (I know that I can download/include all the individual files separately to do this. I am working on doing this now, but it adds a lot of extra config to our build to concat all the individual files so we can serve a consolidated one. We also have quite a few mods to the dataTables source JS code that we merge in with each update, so these are much easier with just 1 file.)
Adding these capabilities to the CDN download would be much easier, especially from a maintenance standpoint. Thanks for considering!
-- Lisa
Replies
Hi Lisa,
Many thanks for the suggestion! It isn't something that has been requested before, so I'll wait a bit to see if anyone else is interested in such a feature. In the meantime, as you say, the workaround would be to download the files and host them locally, rather than pulling them from the CDN, or using the individual core files, rather than a concatenated one.
Allan
Gotcha, understood, and no worries! We already download & host them locally. We previously just had to deal with the 2 concatenated files -- now it is many. That, in and of itself, isn't too bad. We take the separate CSS files and merge them together as desired during the build process. Same for the style-related JS.
The biggest "annoyance" (per se) is that we use the concatenated JS file for merging the "base" (non-style related) code with our code mods (otherwise they are in 5 separate files & I'd rather just have to worry about merging 1 file). When we use the Download builder to fetch the concatenated file, the style-related files are intermixed with the base code (which makes sense). But, it just means I have to manually go in & remove those from various locations in the file (obviously not hard, just not as automated).
Could you use a script to download them and concatenate them from the CDN? Only the version numbers change - the file names will be consistent. If you wanted to get really fancy, you could automate the process entirely by using the version feed to make sure you get the latest versions.
Allan
Probably could, good idea.