pkg-dir-cli
v4.0.0
Published
Find the root directory of an npm package
Downloads
929
Maintainers
Readme
pkg-dir-cli
Find the root directory of a Node.js project or npm package
Install
npm install --global pkg-dir-cli
Usage
$ pkg-dir --help
Usage
$ pkg-dir <cwd>
Examples
$ echo $PWD
/Users/sindresorhus/foo/bar
$ pkg-dir
/Users/sindresorhus/foo
Example
/
└── Users
└── sindresorhus
└── foo
├── package.json
└── bar
└── example.js
$ echo $PWD
/Users/sindresorhus/foo/bar
$ pkg-dir
/Users/sindresorhus/foo
Related
- pkg-dir - API for this module
- find-up-cli - Find a file by walking up parent directories