Package managers

I don’t understand the advantage of downloading a css framework such as Bootstrap, Bulma, or Milligram through a package manager such as NPM, when the only file I use is the main css file, which i can download as a single file anyway.

There is obviously an advantage or the option wouldn’t be available.

Can anyone shed any light on the subject please?

You would need to manually download it and manually put the file/s into your application otherwise. And every time there was a new version you’d need to repeat that process.

Thankyou for your reply. The package manager installs a lot of files I don’t need, and I end up moving the css file to my project folder anyway.

You will see some benefits when you use a build chain, e.g. you build the application, all useless stuff gets removed from the build, minified etc. When you just download the CSS file, you mostly use the whole file.

Also using a package manager increases your developer experience, because you have all external sources in one place, you can update everything in one go, see security vulnerabilities (e.g. with Github dependabot) etc.

But for tiny projects, you probably don’t need a package manager. If you use npm anyway for other packages, I see no reason not to use it.

You’re not making use of the package manager in that case: the point is that you don’t manually move anything (and generally you would be using some kind of build system, the extra files aren’t relevant). If you are just copying a single CSS file, then just download it directly

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.