Enhancing Your Open Source Projects with All Contributors

Welcome to All Contributors

The All Contributors specification is a simple way to acknowledge those who contribute to your open-source projects. The goal is to recognize all contributions, not just code. Below, we’ll walk you through various APIs provided by the all-contributors CLI and demonstrate their uses with examples.

Getting Started

To get started, install the all-contributors CLI:

  $ npm install all-contributors-cli

Adding Contributors

Use the following command to add a contributor:

  $ npx all-contributors add @username code

This command will add the specified user with the ‘code’ contribution type to your project’s contributors table.

Generating the Contributors Table

After adding contributors, generate the table with:

  $ npx all-contributors generate

This will update the README file with the latest list of contributors and their types of contributions.

Supported Contribution Types

Here is a list of the contribution types supported by all-contributors:

  • code
  • design
  • bug
  • doc
  • example
  • eventOrganizing
  • financial
  • ideas
  • infra
  • review
  • security
  • test
  • tool
  • translation
  • tutorial
  • userTesting
  • video

Example Application

Here’s an example of how to set up a Node.js project with the all-contributors specification:

  $ npx create-node-app my-project
  $ cd my-project
  $ npm install all-contributors-cli

  # Initialize your project with a README
  $ echo "# My Project" > README.md

  # Initialize the all-contributors configuration
  $ npx all-contributors init

  # Add a contributor
  $ npx all-contributors add @username doc

  # Generate the contributors table
  $ npx all-contributors generate

This setup process will create a `README.md` file and a `.all-contributorsrc` file, which contains the configuration and the list of all contributors.

Conclusion

Using all-contributors helps you recognize every form of contribution and encourages a more inclusive and welcoming community around your open-source project. Happy contributing!

Hash: ca525b6ccaa297f1d34710877f3bdec2ffea7b9a4d163e2fb90ff9e568725a2c

Leave a Reply

Your email address will not be published. Required fields are marked *