A simple way to get the absolute root path for your current project. Useful for local requires.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

Project Base DEPRECATED

There are situations where this module won't work. Since NPM now flattens your dependency tree (usually a good thing) the assumption this module was built on no longer holds true. I suggest the wrapper method instead, it's as easy as requiring a module.

A very simple, module to solve the require('../../../../something.js') problem. It relies on the fact that npm installs packages to node_modules/.

Don't use v1.0.1, it's broken.

Usage

var r = require('project-base');
var myModule = require(r + 'lib/myModule.js');