The Download builder provides too many files

The Download builder provides too many files

[Deleted User][Deleted User] Posts: 0Questions: 2Answers: 0
edited November 2015 in Free community support

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

  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Answer ✓

    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

  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Answer ✓

    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:

    • Min / Debug
    • Individual files / Concatenated

    without needing to redownload the package. I should put a note somewhere explaining that...

    Allan

  • [Deleted User][Deleted User] Posts: 0Questions: 2Answers: 0
    edited November 2015

    O.K., I am using the following components:

    • DataTables with Bootstrap styling;
    • buttons extension with all possible options (+ jszip and pdfmake);

    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?

  • [Deleted User][Deleted User] Posts: 0Questions: 2Answers: 0

    Also, the pdfmake package needs to include the pdfmake.min.js.map file, as I am getting errors related to it missing.

  • allanallan Posts: 63,258Questions: 1Answers: 10,421 Site admin
    Answer ✓

    How do I know which of all the files I need to include?

    At the bottom of the download builder it gives you the HTML to include the files for the selected options. e.g.:

    <link rel="stylesheet" type="text/css" href="DataTables/datatables.min.css"/>
     
    <script type="text/javascript" src="DataTables/datatables.min.js"></script>
    

    Do I need to also include images and swf?

    No - it should work that out automatically from the CSS.

    why include also foundation/jqueryui/datatables ui, since they are not included in the concatenated versions?

    Valid point! The unused style files should be removed.

    Allan

This discussion has been closed.