module-link

0.0.0 • Public • Published

npm link file

Install

npm install npm-link-file --save-dev

Usage

npm-link-file ./lib/path/file.js file-library

How

Here's the rundown, when you run command above the following happens.

  1. create directory node_modules_linked
  2. create direcotry node_modules_linked/<name>
  3. create package.json with name and main
  4. simlink <file> to node_modules_linked/<name>/index.js
  5. simlink node_modules_linked/<name> to node_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")

Readme

Keywords

none

Package Sidebar

Install

npm i module-link

Weekly Downloads

0

Version

0.0.0

License

ISC

Last publish

Collaborators

  • reggi