Package Exports
- dir-finder
- dir-finder/dist/index.es.js
- dir-finder/dist/index.umd.min.js
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 (dir-finder) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
dir-finder
TypeScript Library for finding directory.
By this library, you can find git/node root easily in your code.😉
install
$ npm i dir-finderHow to use
Find git root
function find by .git existing
import { find_git_root } from './index';
// find git root
const res = find_git_root(__dirname);Find node root
function find by node_modules existing
import { find_git_root } from './index';
// find node root
const res = find_node_root(__dirname);