Reputation: 3592
First time user of npm and bower. I am able to install packages correctly but I am not sure how the dependencies work? As an example, I did "npm install angularjs" in my application root which created a folder "node_modules/angularjs/" with some files in it. I can also see that there is a package.json file within the angularjs folder, and it looks like it has not been processed as there is numerous packages listed in it and not installed.
Long story short, should I install all these packages manually or is there a built in feature that npm/bower can also process these sets of dependencies?
UPDATE:
I greatly lack the ability to ask precise questions, I apologise to those who have answered and did not give the correct sypnosis.
What I expect to happen:
Using npm or bower, I want to clarify that if I do an install of one of their packages, will it automatically also install the new package's dependancies or would I need to do a npm/bower install for each of the packages.json or bower.json files manually?
What I did to try make it work:
My Result:
Upvotes: 1
Views: 6148
Reputation: 542
Npm
and Bower
are great tools for managing your dependencies, i'll try to make it clear in a few words.
In general npm
is used for managing your back-end dependencies and Bower
is responsible for your front end dependencies.
There are 2 config files:
package.json
, here are listed your dependencies that are not used in browser(e.g. bower, grunt). To install all dependencies in package.json run npm install
.Bower.json
, here will be listed your "in browser" dependencies(e.g angular, jQuery). Run bower install
to install all dependencies listed here in bower_componentsYou can find a extended guide i wrote here.
Upvotes: 2