linknpm

install npm packages globally and link them in your projects also adding the entries in your package.json file


Keywords
npm, npmlink, link, global, reuse
License
MIT
Install
npm install linknpm@1.3.0

Documentation

Download an npm package once and reuse it in any future projects without installing again.

Also handles the package.json conflict from foreign project

Installation

You need to install the package globally to use over directories.

$ npm install -g linknpm

Use (Foreign Project)

Navigate to a foreign project directory where package.json is present and node_modules is to be installed

$ cd foreign_app
$ link    # links every dependencies present in package.json file

Use (New Project)

Navigate to a new project directory to link the globally installed packages

only one package allowed at once for now

$ cd newapp
$ link express    # downloads latest "express" module globally, links and updates package.json file

On Conflict between installed version and package.json requirement, it'll prompt for input

  • "u" to update the global package and npm link => npm i -g && npm link
  • "l" to force link the older version that's already installed, gives warning