Skip to content

automatically update package.json according to installed/linked modules in node_modules

Notifications You must be signed in to change notification settings

coderofsalvation/npm-collect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Useful when

  • updating/developing several npm modules in parallel (especially using npm link)
  • creating an package.json file after installing modules

Usage

npm install -g npm-collect

then:

$ npm-collect --help
Usage: npm-collect <options>
Options:
  --devDependencies    process dev-dependencies instead of dependencies
  --new                include modules which are not found in package.json, but are installed
  --save               write changes to package.json
  -v <number>          verboselevel (0=silent,1=normal,2=debug)

Examples

Just see differences without writing to package.json

$ npm-collect
querystring@0.1.9 -> 0.2.0
modulefoo@0.2.9 -> 0.3.0

update your package.json

$ npm-collect --save
querystring@0.1.9 -> 0.2.0
modulefoo@0.2.9 -> 0.3.0

update package.json with newly discovered modules in node_modules

$ npm-collect --new --save
querystring@(unsaved) -> 0.2.0
ohmypgrah@(unsaved)   -> 0.2.0

About

automatically update package.json according to installed/linked modules in node_modules

Resources

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published