proot

Resolve the root directory of the project


Keywords
cwd, root, directory, dir, current, working, project
License
MIT
Install
npm install proot@1.2.1

Documentation

proot

Resolve the root directory of the project.

NPM Version NPM Downloads License

Install

$ npm install proot --save

Usage

Resolve the project's root directory relative to __dirname.

var root = require('proot')();

Resolve the project's root directory relative to process.cwd() (intended for CLIs).

var root = require('proot')(true);

License

MIT