0.1.0 • Published 10 years ago

project-require v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
10 years ago

project-require Build Status

Allows to require project files as absolute paths, relative to the root of your node project. Because how often you're using absolute path in your requires? :)

Example

// override require
var require = require('project-require');

// use it to require everything else,
// and using absolute path, but relative
// to the project's root
var common = require('/lib/common');

// instead of
var worksToo = require('../../../lib/common');

// in rare case when full path needed to be required
var anotherLib = require.thru('/real/absolute/path');

Notes

  • Meant for the projects with deep nested structure.
  • Doesn't affect other modules or files
  • Not meant to be used in shared modules, just for apps
0.1.0

10 years ago

0.0.1

10 years ago