The Download builder provides too many files
The Download builder provides too many files
Hello,
When I use the Download builder and for example use the following options:
- bootstrap styling;
unminified (debug) files
I get a .zip file, which contains much more - it contains both minified and unminifed versions of js and css files and it has all four css types (bootstrap, foundation, datatables, jquery ui). It seems that while the download builder provides the correct CDN links, when one chooses to download the files it ignores the chosen options. It this how it is supposed to work?
Cheers,
Alex
This question has accepted answers - jump to:
Answers
The download builder is actually operating as designed there - it always includes the min and debug concatenated files so you can trivially switch between them. Just including one of them seems a bit redundant to me since if you wanted to switch between them you'd need to redownload the package again. The
<link>
and<script>
tags shown at the bottom of the builder page shows the requires include commands for the options you have selected.Additionally, the package includes the original source files for the packages that are downloaded (int he directories). Although the CSS and JS could be deleted, there are other files which might be required - images, fonts, etc, and their paths are important.
You can choose to delete the CSS and JS files in the packages if you wish. Perhaps the builder should do it... I will look into that.
Allan
Actually - just thought about it - and remembered why it works that way. Its for the "individual files" option.
Basically the package that is downloaded can be used with any combination of:
without needing to redownload the package. I should put a note somewhere explaining that...
Allan
O.K., I am using the following components:
How do I know which of all the files I need to include?
Currently, I have included in my Rails project only the main datatables.min.js and datatables.min.css (they contain a comment, saying that they are a compilation of all the files) and it seems to work. Do I need to also include images and swf?
Also - the thing about the combination of min/debug or individual/concatenated makes sense, but why include also foundation/jqueryui/datatables ui, since they are not included in the concatenated versions?
Also, the pdfmake package needs to include the pdfmake.min.js.map file, as I am getting errors related to it missing.
At the bottom of the download builder it gives you the HTML to include the files for the selected options. e.g.:
No - it should work that out automatically from the CSS.
Valid point! The unused style files should be removed.
Allan