Установка CLI
This guide explains how you can add the Command Line Interface to your project.
-
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:
Окно терминала npm i -D all-contributors-cliОкно терминала pnpm add -D all-contributors-cliОкно терминала yarn add -D all-contributors-cliAlternatively, Arch Linux users can install the
all-contributors-clipackage from the AUR. -
Initialize the Project
Init the project using
initand answer a few questionsОкно терминала npx all-contributors initОкно терминала pnpm all-contributors initОкно терминала yarn all-contributors initОкно терминала ./node_modules/.bin/all-contributors init -
Добавьте некоторых участников
Окно терминала npx all-contributors add jfmengels docnpx all-contributors generateОкно терминала pnpm all-contributors add jfmengels docpnpm all-contributors generateОкно терминала yarn all-contributors add jfmengels docyarn all-contributors generateFor more on the commands see CLI usage.
-
Обновите свою документацию для участников
Consider updating your
CONTRIBUTING.mdor similar with steps on how your contributors can add themselves. You can even link to the cli usage documentation. -
Optionally add shortcut scripts to your
package.jsonYou can optionally add shortcuts to your commands in your
package.jsonscriptsfield.Например:
package.json {"scripts": {"contributors:add": "all-contributors add","contributors:generate": "all-contributors generate"}}To support shortcuts such as:
Окно терминала npx contributors:add jfmengels docОкно терминала pnpm contributors:add jfmengels docОкно терминала yarn contributors:add jfmengels doc
