0.0.7 • Published 7 years ago

link-require v0.0.7

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

link-require

Expose your source folder globally within your project.

This works by essentially creating a symlink of the source directory you wish to expose under node_modules.

Why

Because require('../../../../../../../../../') has to go.

Usage

Installation

npm install --save link-require

Setup

In your package.json:

{
  "scripts": {
    "postinstall": "link-require ./src:app"
   }
}

You can specify multiple mapping as well:

{
  "scripts": {
    "postinstall": "link-require ./src:src ./lib:lib"
   }
}

When requiring

const mySource = require('app/mySource')
0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago