code: function findPkgByFolder(folder, list) {
    var ret = null;
  
    if (list && list.length) {
      list.every(function(item) {
        if (item.folder === folder || path.resolve(baseUrl, item.folder) === folder) {
          ret = item;
          return false;
        }
  
        return true;
      });
    }
  
    return ret;
  }
docs: find package base on folder name 根据目录位置查找是否属于某个 package 配置