Package Exports
- git-toplevel
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (git-toplevel) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
git-toplevel
Method to find the top level git directory
Install
npm i --save git-toplevel
Usage
var gitTopLevel = require('git-toplevel');
gitTopLevel().then(function(dir) {
// dir ===> the git root
}).catch(function(err) {
// err ===> any error that happen when trying to get the top level dir
});