task: async()

in scripts/sync-docs.js [35:61]


        task: async () => {
          const { name } = project;
          const dir = `${tempPath}/${name}/`;
          const exist = await isDirExisted(dir);
          if (exist) {
            gitMap[name] = simpleGit(dir);
            await gitMap[name]
              .cwd(dir)
              .fetch(['--prune', '--filter=blob:none', '--recurse-submodules=no']);
          } else {
            gitMap[name] = simpleGit();
            await gitMap[name]
              .clone(`https://github.com/apache/${name}.git`, dir, {
                '--filter': 'blob:none',
                '--sparse': true,
                '--recurse-submodules': 'no',
              })
              .cwd(dir)
              .raw(['sparse-checkout', 'set', 'docs']);

            if (name === 'apisix') {
              await gitMap[name]
                .cwd(dir)
                .raw(['sparse-checkout', 'add', 'apisix/core', 'autodocs']);
            }
          }
        },