D
D
Dmitry2018-02-08 07:49:54
gulp.js
Dmitry, 2018-02-08 07:49:54

Yarn as an alternative to Bower?

I recently found out that it turns out everyone is already using Yarn + webpack instead of Bower+gulp/grunt . With webpack, everything is even clearer to me. But yarn instead of bower seems inconvenient to me .. Everything falls into node_modules to the heap. Nope, like in bower search .. Who switched from gulp to webpack wondering how to work better in general?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Litvinenko, 2018-02-08
@edli007

Rather npm. npm has had process optimization issues in certain versions, which yarn has been the solution to. npm quickly solved its problems and did not have time to gain such a direct overweight of yarn. I don't think the future is with him. It's a good package manager, but since it's not a native technology, it's going to be around for a long time, but not as long as the native technology. We got one more package manager for a certain number of years with equivalent capabilities, and the choice at the moment is a matter of taste and desire.
Over time, the yarn niche will be replaced by something else, but npm will remain.
As for npm\yarn vs bower itself, it's all for different things, but two technologies on the same project in this technological direction creates a lot of inconvenience. For example, the same webpack, devops will definitely kill someone for setting up two package managers at once, which in fact do things very similar and do not shine with the uniqueness of the repositories.
As said in another thread

npm - package manager, needed to install packages for your application
bower package manager, to install third-party js libraries. There are also technicalities to how it installs packages.

from this it becomes clear that each of these package managers does its job better, but if you leave one of the two, then npm copes with someone else's work much better than if you try to connect bower in a similar capacity.
Hence the conclusion - use npm, which is what everyone does.
And given that npm existed long before various baver / composers, since the import of existing libraries to them usually goes to several repositories at once, including npm, then its repositories have everything the same as on others. But things initially with npm may not get to the bower turnip.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question