findConfigFileInDir (filename, dir) {
    let foundConfig;
    const target = this.path.resolve(this.path.join(dir, filename));
    if (this.fs.existsSync(target)) {
      this.log.debug(`Found file: ${target}`);
      foundConfig = require(target);
      // if it has an apidoc key, read that
      if (foundConfig.apidoc) {
        this.log.verbose(`Using apidoc key of ${filename}`);
        return foundConfig.apidoc;
      }
      // for package.json we don't want to read it if it has no apidoc key
      if (filename !== 'package.json') {
        return foundConfig;
      }
    }
    return {};
  }
/**
   * Scan a directory for config files
   */
Scan a directory for config files
Scan a directory for config files
findConfigFileInDir (filename, dir) {
    let foundConfig;
    const target = this.path.resolve(this.path.join(dir, filename));
    if (this.fs.existsSync(target)) {
      this.log.debug(`Found file: ${target}`);
      foundConfig = require(target);
      if (foundConfig.apidoc) {
        this.log.verbose(`Using apidoc key of ${filename}`);
        return foundConfig.apidoc;
      }
      if (filename !== 'package.json') {
        return foundConfig;
      }
    }
    return {};
  }
findConfigFileInDir ( filename , dir ) { let foundConfig ; const target = this . path . resolve ( this . path . join ( dir , filename ) ) ; if ( this . fs . existsSync ( target ) ) { this . log . debug ( ` ${ target } ` ) ; foundConfig = require ( target ) ; if ( foundConfig . apidoc ) { this . log . verbose ( ` ${ filename } ` ) ; return foundConfig . apidoc ; } if ( filename !== 'package.json' ) { return foundConfig ; } } return { } ; }
Scan a directory for config files
Scan a directory for config files
// if it has an apidoc key, read that // for package.json we don't want to read it if it has no apidoc key