Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Find the root directory of a Node.js project or npm package

License

Notifications You must be signed in to change notification settings

sindresorhus/package-directory-cli

Repository files navigation

package-directory-cli

Find the root directory of a Node.js project or npm package

Install

npm install --global package-directory-cli

Usage

$ package-directory --help

Usage
$ package-directory

Examples
$ echo $PWD
/Users/sindresorhus/foo/bar
$ package-directory
/Users/sindresorhus/foo

Example

/
+-- Users
+-- sindresorhus
+-- foo
+-- package.json
+-- bar
+-- example.js
$ echo $PWD
/Users/sindresorhus/foo/bar
$ package-directory
/Users/sindresorhus/foo

Related

About

Find the root directory of a Node.js project or npm package

Resources

Readme

License

MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2