Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

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"
}
Something went wrong with that request. Please try again.