0.2.1 • Published 7 years ago

root-path v0.2.1

Weekly downloads
692
License
MIT
Repository
github
Last release
7 years ago

root-path

Normalize paths, joined with project's root path

NPM Version

NOTE: The directory with package.json is considered a project's root directory.

install

npm install --save root-path

usage

var root = require('root-path');

var x1 = root();
// returns {PROJECT_ROOT}

var x2 = root('path');
// returns {PROJECT_ROOT}/path

var x3 = root('path1', 'path2');
// returns {PROJECT_ROOT}/path1/path2