npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

umi-clone-file-gitlab

v1.6.1

Published

umijs框架的插件包,实现从其他仓拉取文件到当前仓库

Readme

umi-clone-file-gitlab

中文 🇨🇳 | English 🇬🇧

一个用于将其他 GitLab 仓库文件克隆到当前 UmiJS 项目的插件。支持递归获取 Markdown 文件,并兼容多种 GitLab API 下载方式。

功能特点

  • 从任意 GitLab 仓库克隆文件到 UmiJS 项目
  • 递归获取指定路径下所有 Markdown 文件(.md.mdx
  • 多种下载策略:raw、repository files、blobs
  • API 连接测试工具
  • TypeScript 类型支持

安装方法

pnpm add umi-clone-file-gitlab --save-dev
# 或
npm install umi-clone-file-gitlab --save-dev

使用方法

在 UmiJS 配置文件中添加插件:

// .umirc.ts 或 config/config.ts
export default {
  plugins: [require.resolve("umi-clone-file-gitlab")],
  PeaksCopy: {
    url: "https://gitlab.example.com/api/v4/projects/123/repository/tree?path=docs&ref=main",
    outputPath: "./docs",
    gitLabToken: "your-gitlab-token",
  },
};

配置参数

| 参数 | 类型 | 说明 | | ----------- | ------ | -------------------------- | | url | string | 目标仓库的 GitLab API 地址 | | outputPath | string | 本地输出目录 | | gitLabToken | string | GitLab 私有 Token |

主要 API

fetchAllFiles(options)

递归获取指定仓库路径下所有 Markdown 文件。

downloadFile(options)

下载单个文件内容,自动兼容多种 GitLab API。

parseGitlabApiInfo(options)

解析 GitLab API 地址,提取项目信息。

testApiConnection(options)

测试 API 连接和仓库权限。

开发与调试

pnpm run build
pnpm run lint
pnpm run test

许可证

ISC

作者

zhuhaifeng