npm

Need private packages and team management tools?Check out npm Orgs. »

pkg-dir-cli

2.1.0 • Public • Published

pkg-dir-cli Build Status

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

License

MIT © Sindre Sorhus

install

npm i pkg-dir-cli

Downloadsweekly downloads

1

version

2.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability