This package has been deprecated

Author message:

Deprecated in favor of https://www.npmjs.com/package/global-define

project-require

0.1.0 • Public • Published

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

Package Sidebar

Install

npm i project-require

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • alexindigo