Aller au contenu

Installation de l'invité de commande

This guide explains how you can add the Command Line Interface to your project.

  1. How to Install the All Contributors CLI tool

    The all-contributors CLI module is distributed via npm which is bundled with node and should be installed as one of your project’s devDependencies.

    To install it run:

    Fenêtre de terminal
    npm i -D all-contributors-cli

    Alternatively, Arch Linux users can install the all-contributors-cli package from the AUR.

  2. Initialize the Project

    Init the project using init and answer a few questions

    Fenêtre de terminal
    npx all-contributors init
  3. Ajoutez quelques contributeurs

    Fenêtre de terminal
    npx all-contributors add jfmengels doc
    npx all-contributors generate

    For more on the commands see CLI usage.

  4. Mettez à jour votre document de Contribution

    Consider updating your CONTRIBUTING.md or similar with steps on how your contributors can add themselves. You can even link to the cli usage documentation.

  5. Optionally add shortcut scripts to your package.json

    You can optionally add shortcuts to your commands in your package.json scripts field.

    Par exemple :

    package.json
    {
    "scripts": {
    "contributors:add": "all-contributors add",
    "contributors:generate": "all-contributors generate"
    }
    }

    To support shortcuts such as:

    Fenêtre de terminal
    npx contributors:add jfmengels doc