I am wondering what's the difference between these 3 ways of including third party code in a project. For example, in bootstrap, I can include the css and javascript with a cdn link, or download the minified versions and include them in the project or install bootstap with a package manager in the directory of my project. I understand that the cdn is not good because maybe there will be a version change and still have the old version's code and it needs internet connection in order to work. But what's the difference between installing bootstrap with a package manager and just download the min versions and include them?
Some quick comparison points:
If you are not connected to the internet, your NPM package will still work. Your CDN link will not.
CDN usually only hosts the most popular stuff. If you want to use a less popular package, you'll want to use NPM.
Updating NPM packages is easier, especially since some forms will look for major/minor updates. You'd have to change your CDN link by hand.