code: function createDataJSON(pathArr) {
    return new Promise((resolve, reject) => {
      try {
        const commandData = {};
        const indexes = [];
        pathArr.forEach((mdPath, i) => {
          const json = {}
          const con = FS.readFileSync(mdPath);
          const str = con.toString();
          let title = str.match(/[^===]+(?=[===])/g);
          title = title[0] ? title[0].replace(/\n/g, '') : title[0];
          title = title.replace(/\r/, '')
          // 命令名称
          json["n"] = title;
          // 命令路径
          json["p"] = `/${path.basename(mdPath, '.md').replace(/\\/g, '/')}`;
          // 命令描述
          let des = str.match(/\n==={1,}([\s\S]*?)##/i);
          if (!des) {
            throw `格式错误: ${mdPath}`;
          }
          des = des[1] ? des[1].replace(/\n/g, '') : des[1];
          des = des.replace(/\r/g, '')
          json["d"] = des;
          indexes.push(json);
          commandData[title] = json;
        })
        resolve({
          json: commandData,
          data: indexes
        });
      } catch (err) {
        reject(err);
      }
    });
  }
docs: Ensures that the directory exists.
  @param {String} pathArr