lib/cli-engine.js
function(directory) {
    if (!this.packageJSONFinder) {
      this.packageJSONFinder = new FileFinder(PACKAGE_FILENAME);
    }

    return this.packageJSONFinder.findInDirectoryOrParentsSync(directory || process.cwd());
  }
function(directory) {
    if (!this.packageJSONFinder) {
      this.packageJSONFinder = new FileFinder(PACKAGE_FILENAME);
    }

    return this.packageJSONFinder.findInDirectoryOrParentsSync(directory || process.cwd());
  }
function ( directory ) { if ( ! this . packageJSONFinder ) { this . packageJSONFinder = new FileFinder ( PACKAGE_FILENAME ) ; } return this . packageJSONFinder . findInDirectoryOrParentsSync ( directory || process . cwd ( ) ) ; }
Find package.json from directory and parent directories.
@param {string} directory The directory to start searching from.
@returns {string[]} The paths of local config files found.
Find package . json from directory and parent directories .