D
D
Denis Karakchiev2017-03-24 13:55:17
css
Denis Karakchiev, 2017-03-24 13:55:17

Npm or bower for the front?

Why not npm
The main difference between npm and Bover is the approach to installing package dependencies. Npm installs the dependencies for each package separately, in the folder of this package, then installs the dependencies of the dependencies in the same way, and so on. In client-side javascript, this is not allowed: you cannot include two versions of jQuery or any other library on a page. In Bover, each package is installed once, and in the event of a dependency conflict, Bover will simply not install a package that is incompatible with those already installed.

Quote from hacker from 2014. Today I see that people are talking about some changes in npm, but as a beginner, of course, this zoo of tools scares me to such an extent that I simply can’t figure it out without stupid questions.
What exactly has changed in npm and by how much, does it allow you to completely replace bower and, regarding the quote, do the dependencies now behave like in the latter, or not?
And where would you even read about these notorious dependencies? I have not seen anything like this in Kantor's textbook, or in CSS / HTML manuals, an attempt to google also only leads to how to deal with them, but what is it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
J
Jaroslaw Goszowski, 2018-01-29
@goszowski

different js libraries are used for this. e.g. www.chartjs.org

A
Alexey, 2018-01-29
@AlexMaxTM

for example

P
Philip Gaponenko, 2018-01-29
@filgaponenko

d3.js <3 https://d3js.org/

S
Sergey delphinpro, 2017-03-24
@uokersam

The main difference between npm and Bover is the approach to installing package dependencies.

It seemed to me that the main difference was in using installed packages, not in installing them.
Bower assumes that you will either manually include each necessary file with script / link tags, or use the build system, gluing the libraries together. NPM assumes that you use the build system in any way and include dependencies as modules with import or require .
Correct me if I'm wrong.

A
Alexander Manakov, 2017-03-24
@gogolor

Yarn is trending right now, a manager that pulls packages from npm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question