How to install local npm package in a project

In typical case scenario you pass a published package name when installing it via npm:

npm install jquery

Let's say you have awesome-editor library written by yourself stored on your local machine under ~/projects/awesome-editor.

Installing it in your project is as simple as:

npm install ~/projects/awesome-editor

Once the installation is finished you will see a new entry in package.json:

"awesome-editor": "file:<relative path goes here>",

That's it, you can now use it in your project!