All Contributors

All Contributors

  • 文档
  • GitHub
  • Languages icon中文
    • English
    • 日本語
    • Deutsch
    • Español
    • Français
    • Bahasa Indonesia
    • 한국어
    • Polski
    • Português (Brasil)
    • Русский

›CLI

规范

  • 概览
  • 规范
  • Emoji键 ✨
  • 仓库维护人员
  • 工具

@all-contributors Bot 🤖

  • 概览
  • 安装
  • 用法
  • 配置
  • FAQs

CLI

  • 概览
  • 安装
  • 用法
  • 配置

项目

  • 帮助我们改进
  • 行为准则
  • 如何实现?
Edit

CLI安装

1. 安装 CLI 工具

NPM版本 AUR 版本

此模块通过与节点捆绑在一起的npm进行分布,并且应该已经安装在你项目的devDependencies。

yarn add --dev all-contributors-cli # 或 npm i -D all-contributors-cli

另外,Arch Linux 用户可以从 AUR 安装 all-contributors-cli 包。

The CLI is node-based, if you don't wish to add a node dependency use the @all-contributors bot 🤖

2. 初始项目

使用init来初始项目,并且回答一些问题。

yarn all-contributors init # 或 npx all-contributors init 

# 或直接运行二进制文件
./node_modules/.bin/all-contributors init

3. 添加贡献者

yarn all-contributors add jfmengels doc
yarn all-contributors generate

命令详情请参阅CLI用法。

4. 更新你的贡献者文档

可以考虑更新你的CONTRIBUTING.md或者类似文件,用来列举贡献者如何添加自己的步骤。 你甚至可以链接到cli usage documentation。

5. 可选择地添加快捷脚本到你的package.json

你可以选择在package.json scripts中添加快捷命令。

例如:

{
  "scripts": {
    "contributors:add": "all-contributors add",
    "contributors:generate": "all-contributors generate"
  }
}

可用的快捷方式例如:

yarn contributors:add jfmengels doc

接下来呢?

  • 使用CLI
  • 配置CLI
← 概览用法 →
  • 1. 安装 CLI 工具
  • 2. 初始项目
  • 3. 添加贡献者
  • 4. 更新你的贡献者文档
  • 5. 可选择地添加快捷脚本到你的package.json
  • 接下来呢?
All Contributors