E
E
Evgeny Petrov2016-12-17 23:27:37
npm
Evgeny Petrov, 2016-12-17 23:27:37

Why does installing any libraries require me to download via npm or bower?

Good day!
I noticed recently, wherever you need to download any library (angular, react, ember, etc.), you must first install some kind of npm so that it downloads me, for example, react.min.js, angular. min.js and put it in the node_modules folder? Why so many hemorrhoids? Why complicated? It would be easier for me to go to the site, take some javascript library from there and drive it into a web page through script src="path". BUT, everything would be fine if they left a choice. There is no longer such an easy way. To download via npm, some left directories are added to the initial project structure, some packajes.json file to configure, some dependencies are just quiet horror. Or please convince me that the package-manager is useful and necessary for me. I will be very grateful.

Answer the question

In order to leave comments, you need to log in

7 answer(s)
S
sim3x, 2016-12-17
@sim3x

Let 's not
bother with manual downloads and manual maintenance of dependencies

I
index0h, 2016-12-18
@index0h

do I need to first install some kind of npm so that it downloads, for example, react.min.js, angular.min.js and puts it in the node_modules folder?

Generally speaking, minified files, as a rule, can be freely downloaded by hand, go to the github of the project in the releases tab, and pull out the minified file.
You have a very peculiar concept about hemorrhoids and complications. To install the same react, just run
Who forbids that?)) You go to the office. github/website and download.
Yes, no question, minify the sources of your front. Only in such a way that this process is automated, transferable and with the simplest possible installation.

A
Anton L, 2016-12-17
@antonecma

So at this stage, work through the CDN. It will take a little (or a lot xs) time and you will understand why all these beliefs are needed.

V
Vasyl Kovbassa, 2016-12-17
@movasyl

Just google some gulp screencast and in a couple of hours your life will never be the same again :) :) :)

V
vintage, 2016-12-17
@vintage

https://unpkg.com/

A
amorphine, 2016-12-18
@amorphine

In the development world, you won't always write projects from scratch, and you won't always maintain projects personally.
It is considered good practice to include third-party code via npm/composer/bower/pip/pear, etc. why? And because it is more convenient to update and you do not need to store third-party libs in the project turnip.

U
UsulPro, 2016-12-24
@UsulPro

Because the world does not stand still!
Read the JavaScript Technology Stack from scratch - a short tutorial, maybe something will clear up for you

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question