Extends current module paths with process.mainModule paths
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
History.md
Readme.md
index.js
package.json

Readme.md

node-path

This is module is a simple hack to allow old require.paths deprecated method.

Install

$ npm install node-path

Usage

// On process.mainModule; eg: node index.js
require('node-path')(module, ['../libs', '../vendor']);

// On a child module
require('node-path')(module);

var myLib = require('my-lib-in-libs');
var myVendor = require('my-vendor-in-vendors');

Todo

  • Add some tests
  • Improve extend method

Licence

MIT