Generally I am using CDN (or nuget) for including Bootstrap or other client side libraries to my website
Recently I read about NPM/Bower and other modern package-management tools, and decided to try
After some time of surfing and investigating I am now completely puzzled, how to just download and include bootstrap distrib css/js files to my page like it was....
1 st Try, I install bootstrap with NPM
, it downloads whole Bootstrap with all sources/modules and etc to the node_module
directory... well, I found distributions in node_modules/Bootstrap/dist
folder
now questions:
- Should I link
node_modules/Bootstrap/dist/ css and js
files to my site? - If yes, should I then deploy whole
node_modules
folder with website? if No, and I know that npm package is modular and bla bla bla and should be included by
require("bootstrap")
than lots of other questions- is
require("bootstrap")
node js or some oter js function? - should I include some other node packages or js files in order require("bootstrap") to work
- where should I write
require("bootstrap")
in html in script tag? create some js and include it or what?
- is
2 nd try, Ok than I understand that npm might be package management for NodeJs server side, and got bower... but again it downloads the same files to another folder bower_components and again same questions...