Bootstrap Plugins in XPages
Part I : Bootstrap-select - A jQuery plugin that utilizes Bootstrap's dropdown.js
Part II : Bootstrap FileStyle - Customization of input file for Bootstrap
Part III : Dialog Boxes using Bootbox
Part IV : Awesome Bootstrap Checkbox
Part VII : MagicSuggest A Multiple Selection Combobox
Part VIII : Bootstrap Maxlength
Part IX : Using Node.js, Bower, Git and SourceTree to install Bootstrap Plugins (1)
Part X : Using Node.js, Bower, Git and SourceTree to install Bootstrap Plugins (2)
First of all, any changes in the source code of the packages is futile. The next update will override everything. So, for example, no more throwing components out of Bootstrap to reduce size because we don't need them.
Secondly the package we are searching for might not exists. We do not have a lot of options in this case and will still have to revert back to the good old find, download, extract and copy way.
Finally when using a standard Bower install based on a bower.json file and a .bowerrc file, Bower installs entire repositories. This means that all files from the repository are imported and NOT only the files that are needed for a specific Package (Bootstrap Plugin) to make it work in an application.
This is a major disadvantage of the standard installation of Bootstrap Plugins using Bower.
Let's take a closer look at the Select2 files we imported in the previous blog post. Based on the bower.json file we used, Select2 4.0.3 has been installed in the On-Disk Project (ODP) after running 'bower install'.
However, to use Select2 within an XPages application we only need the files in the dist folder.
For me personally this is not the desired outcome. A large number of files have been installed in the NSF that are completely unnecessary for the functioning of the Bootstrap plugin in an XPages application. In the next blog posts we take a deep dive into Bower and provide some solutions how to grab only the files which are really needed for a Bootstrap Plugin when using Bower for installing Packages in XPages applications.