1.0.0 • Published 7 years ago
git-root-path v1.0.0
Git Root Path
This npm module allows you to get the root path of a git repository.
Installation
$ npm install git-root-path
Usage
var gitRootPath = require("git-root-path");
// You can pass a folder name to find the root of the repository
var path = gitRootPath("/root/gitrepo/path/to/folder");
// /root/gitrepo
// If you don't pass any arguments then the current folder is taken
var path = gitRootPath();
1.0.0
7 years ago