How to install local npm package in a project

In some cases, like for testing purposes, you might want to use an npm package stored on a local machine. Here is how you can do that with one simple command.

Table of contents

    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!

    Download our ebook
    Szymon Soppa Web Developer
    Szymon Soppa Curiosum Founder & CEO

    Read more
    on #curiosum blog

    7 Reasons Why You Might Need a Custom Marketing Tool

    Managing a marketing agency or introducing a company to digital transformation in the area of marketing, requires an extraordinary focus on the tools that you should use. Usually, they facilitate the work of marketers and allow you to achieve the expected results of each project and advertising campaign you are working on.

    How to upload a file in Elixir with Waffle

    The ability to upload files is a key requirement for many todays web and mobile applications. In this tutorial, we will look at how we can accomplish file uploads to local storage and S3 server in Phoenix with the help of Waffle library.