Which bootstrap 4 files should be included in a project?

0

I downloaded the files from Bootstrap 4 and came the following files:

CSS Folder:

 - bootstrap.css
 - bootstrap.css.map  
 - bootstrap.min 
 - bootstrap.min.css.map   
 - bootstrap-grid 
 - bootstrap-grid.css.map 
 - bootstrap-reboot
 - bootstrap-reboot.css.map 
 - bootstrap-reboot.min
 - bootstrap-reboot.min.css.map

JS Folder:

 - bootstrap.bundle
 - bootstrap.bundle.js.map
 - bootstrap.bundle.min
 - bootstrap.bundle.min.js.map
 - bootstrap.js
 - bootstrap.js.map
 - bootstrap.min
 - bootstrap.min.js.map

I would like to know which ones I should include, and because in version 3 of Bootstrap there were no such files bootstrap-grid , bootstrap-reboot and bootstrap-bundle .

In Bootstrap 3 I used to insert the files js/bootstrap.min.js and css/bootstrap.min.css plus JQuery 3.2.1 .

    
asked by anonymous 17.11.2017 / 15:07

1 answer

1

It is very broad , depends on the project, it depends on the need , you can not say.

It may be that if the project is simple only bootstrap.min.css will be necessary, if it is a project that will use popups (bootstrap apis) then it would require bootstrap.min.css and jQuery and bootstrap.min.js , , for example in most projects I use only bootstrap.min.css , but it has projects that use .js and .css

If it is a project that needs to be debugged, then adding the .map together with the non-minified sources ( .min.js and .min.css ) can help a lot to understand some behavior, generally I would use only in development environment or homologation .

  

About the map: link

I have projects that do not even need jQuery, it is usually so little use that I just take advantage of the same GRID system.

What are bootstrap-grid, bootstrap-reboot and bootstrap-bundle

You probably downloaded the source for development, this 3 together is the bootstrap, if you do not want to participate as a Bootstrap developer or create a fork of it this will be interesting (download the source with the separate files), similar to this project link , which is a fork

But for most projects that you get isolated, you do not even need to, because we end up needing one or another hour of a specific functionality, unless you only need one or other Bootstrap functionality, so picking up only bits of it useful in most projects using CDN will be more than enough.

If you only need CSS add:

 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">

If you need the APIs add:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>

<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>

Customizing Bootstrap

Note that until 3.3 it was possible to customize the bootstrap to download only the desired components link , however it seems that this is not yet available in 4.0, but of course it is possible to "compile" manually, downloading the sources, just as you did

    
17.11.2017 / 15:21