Wondering what’s next for npm?Check out our public roadmap! »

    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

    138

    Version

    2.1.0

    License

    MIT

    Last publish

    Collaborators

    • avatar