Created
August 10, 2015 14:06
-
-
Save marcuslilja/76fd22c0b45c9830cb2c to your computer and use it in GitHub Desktop.
Revisions
-
marcuslilja created this gist
Aug 10, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ # How to create a local scoped npm module 1. The main file of the module should be named `index.js`. 2. Initialize the module by running `npm init --scope=<your-scope>`. 3. Install local module with `npm install --save <path-to-module>`. ## Example Local module resides in `lib/custom-module`, the scope of the module should be `marcuslilja`. 1. Run `npm init --scope=marcuslilja` in `lib/custom-module`. 2. Run `npm install --save lib/custom-module`. ```javascript var customModule = require('@marcuslilja/custom-module'); ```