@cdr0/include
v1.0.4
Published
Like require, but gets from sibling directory if present.
Downloads
5
Readme
include
Like require, but gets from sibling directory if present.
The easy way to work on multiple repos.
One Fish
Develop all your modules in the same directory:
- project-root
- project-1
- project-2
- project-3
- red-fish
- blue-fish
Two Fish
npm i -S @cdr0/include
// At the top
const include = requre('@cdr0/include')(module);
// ...
const redFish = include('red-fish') || require('red-fish');
const blueFish = include('@org/blue-fish') || require('@org/blue-fish');
Notes
Sibling directories can be named anything -- @cdr0/include uses package.json
for the
module name, not the directory name.