Reputation: 1570
I have created the package.json using npm init. After some stage I installed few more modules as per the need.Rather than updating the package.json dependencies manually, is there any way to automatically update it??
Upvotes: 1
Views: 840
Reputation: 4783
For download the all packages configured in the package.json
, use:
npm update --save
Docs: https://docs.npmjs.com/cli/update
Upvotes: 0
Reputation: 366
If I understand what you are asking correctly, you want to use npm to install a dependency and have that dependency automatically added to your package.json
?
If so, use --save
after the package name :
npm install [package name] --save
Upvotes: 1