0.0.0 • Published 10 years ago
npm-link-file v0.0.0
npm link file
Install
npm install npm-link-file --save-devUsage
npm-link-file ./lib/path/file.js file-libraryHow
Here's the rundown, when you run command above the following happens.
- create directory
node_modules_linked - create direcotry
node_modules_linked/<name> - create
package.jsonwith name and main - simlink
<file>tonode_modules_linked/<name>/index.js - simlink
node_modules_linked/<name>tonode_modules/<name>
Why?
Have you ever wanted to require a file absolutely as a module?
var fileLibrary = require("file-library")Instead of relatively like this.
var fileLibrary = require("./lib/path/file.js")0.0.0
10 years ago