What is NPM exactly? I know how to use it, but what does it do?
For further actions, you may consider blocking this person and/or reporting abuse
What is NPM exactly? I know how to use it, but what does it do?
For further actions, you may consider blocking this person and/or reporting abuse
Rodrigo Luglio -
Taki089.Dang -
Abhishek Jaiswal -
Somil Gupta -
Top comments (10)
You want to build a cool spaceship out of Lego - someone else already made a rocket engine, a fuel tank, some grid fins and a launch tower - so you use NPM to find and get the premade components to build your space ship faster. Then, when you launch you realise that because nobody verified that the components were secure, someone hid a stow away on your spaceship š
You want to build a cool spaceship out of Legos, so you use NPM to add a wing that was already made with Legos, but that wing is dependent on crayons, plastic, pasta, exhaust pipes, care bears, coffee, and metal shards and now your Lego spaceship is too heavy and bulky to take off.
Haha this sounds like my kidsā Lego!
That sounds a lot like a past gradle nightmare.
Great analogy, that defiantly helped understand npm better.
When you want to build something today, you use pre-made components, like Lego blocks. NPM is a Lego box with all the sizes, shapes and colors you can ask for, and then some. Just make sure you read the manual first because there are some Duplo ones that don't match!
On a more serious note, NPM is a package manager and repository. People publish there ready to use fragments of code ā "packages" āĀ written in JavaScript that are free to use. The standard for the JS community. Just remember to use the packages that are maintained (check via GitHub). You don't want unreliable vendors :)
Thanks for the tips.
You're drawing a house on a piece of paper. You want to add doors and windows. You grab a stamp with windows and doors, and you use that in your drawing. Now you have a house (that you drew) with doors and windows (that someone else made, but you used)
Package manager
More info: docs.npmjs.com/cli/npm
Usage: npm install
you just remind me to an interview that i had a while ago. same question but instead of npm it was ruby on rails lol