npmlv

List module versions in your project in format easy to copy and paste to your package.json.

npm install npmlv
8 downloads in the last week
14 downloads in the last month

npmlv: npm "list versions" command equivalent

Description

List module versions in your project in format easy to copy and paste to your package.json.

Install

[sudo] npm install npmlv -g

Usage

cd your_module_root_dir

To print dependencies on exact versions (treading safe):

npmlv

Prints:

{
    "async-mini": "0.1.0",
    "laeh2": "0.2.0",
    "mongodb": "0.9.7",
    "underscore": "1.1.7"
}

To print dependencies for floating patch versions:

npmlv -t

Prints:

{
    "async-mini": "~0.1.0",
    "laeh2": "~0.2.0",
    "mongodb": "~0.9.7",
    "underscore": "~1.1.7"
}

To print dependencies on exact and higher versions (optimistic):

npmlv -n

Prints:

{
    "async-mini": ">=0.1.0",
    "laeh2": ">=0.2.0",
    "mongodb": ">=0.9.7",
    "underscore": ">=1.1.7"
}

To print dependencies on any version (should be same as optimistic really, but feels more Lemonade Joe):

npmlv -a

Prints:

{
    "async-mini": "*",
    "laeh2": "*",
    "mongodb": "*",
    "underscore": "*"
}

To keep any urls defined as they are in your package.json. May be combined with other flags:

npmlv -k [-t]

Prints:

{
    "async-mini": "~0.1.0",
    "laeh2": "~0.2.0",
    "mongodb": "git://github.com/mongodb/node-mongodb-native.git",
    "underscore": "~1.1.7"
}
npm loves you