code: function getDirectoryFromBowerRc(cwd) {
      var bowerrc = path.join(cwd, '.bowerrc');
  
      if (!fs.existsSync(bowerrc)) {
          return '';
      }
  
      var bower_config = {};
      try {
          bower_config = JSON.parse(fs.readFileSync(bowerrc));
      } catch (err) {
          return '';
      }
  
      return bower_config.directory;
  }
docs: Detect .bowerrc file and read directory from file
  
  @param {string} cwd current working directory
  @returns {string} found directory or empty string