You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## 1. How to Install the All-Contributors CLI tool
15
12
16
-
This module is distributed via [npm](https://www.npmjs.com/) which is bundled with [node](https://nodejs.org/) and
17
-
should be installed as one of your project's `devDependencies`:
13
+
The all-contributors CLI module is distributed via [npm](https://www.npmjs.com/) which is bundled with [node](https://nodejs.org/) and
14
+
should be installed as one of your project's `devDependencies`.
15
+
16
+
To install it run:
18
17
19
18
```console
20
19
npm i -D all-contributors-cli
@@ -23,7 +22,9 @@ npm i -D all-contributors-cli
23
22
24
23
Alternatively, Arch Linux users can install the [`all-contributors-cli`](https://aur.archlinux.org/packages/all-contributors-cli) package from the AUR.
25
24
26
-
> The CLI is node-based, if you don't wish to add a node dependency use the [@all-contributors bot 🤖](../bot/overview)
25
+
<Asidetype="tip">
26
+
The CLI is node-based, if you don't wish to add a node dependency use the [@all-contributors bot 🤖](../bot/overview)
<aclass="github-button"href="https://github.com/all-contributors/all-contributors-cli"data-icon="octicon-star"data-count-href="/all-contributors/all-contributors-cli/stargazers"data-show-count="true"data-count-aria-label="# stargazers on GitHub"aria-label="Star this project on GitHub" >Star</a>
## About the the All-Contributors Command Line Interface (CLI)
13
11
14
-
You want to implement the [All Contributors](../specification) spec, but don't
15
-
want to maintain the table by hand
12
+
The all-contributors-cli is a tool that helps you automate adding contributor acknowledgements for your GitHub or GitLab repository at the command line. THe GitHub bot allows you to call our bot in a issue or pull request.
16
13
17
-
## The CLI solution
14
+
You want to use the command line because:
15
+
- You want to add contributors in bulk
16
+
- You want to add contributors as part of your project scripts
17
+
- You want to add contributors as part of your continuous integration (CI) process
18
18
19
-
The all-contributors-cli is a tool to help automate adding contributor acknowledgements for your GitHub or GitLab repository.
20
-
21
-
-[Installing the CLI](installation)
22
-
-[Using the CLI](usage)
23
-
-[Configuring the CLI](configuration)
19
+
Similar to the bot, the CLI allows you to implement the [All Contributors](../specification) spec, without maintaining the contributor table by hand.
> This usage documentation assumes you have already followed the [cli installation steps](installation).
8
+
<Asidetype="tip"> This usage documentation assumes you have already followed the [cli installation steps](installation). Below you will learn how to use the CLI with the `all-contributors` command, to keep things simple. If you are having any difficulties running the command on it's own, then give the `npx all-contributors-cli init` route a try 😺.</Aside>
8
9
9
-
A quick note: Below we'll just show `all-contributors` to keep things simple, but if you're having any difficulties, then give the `npx all-contributors-cli init` route a try 😺.
10
10
11
-
## Commands
12
-
13
-
<AUTOGENERATED_TABLE_OF_CONTENTS>
11
+
## All-Contributors Command Line Interface Commands
14
12
15
13
### `all-contributors init`
16
14
17
-
Run this when you first start using the all-contributors-cli. This command asks a few questions and sets up the project for all-contributors.
18
-
This setup includes creating a `.all-contributorsrc` configuration file and creating a contributor table in the `files` you specify (usually your `README.md`).
15
+
You can run `all-contributors init` when you first start using the All-Contributors CLI. This command asks a you few questions. It then, sets up the project to support All-Contributors.
16
+
17
+
The setup includes creating:
18
+
* an `.all-contributorsrc` configuration file and
19
+
* a contributor table in the `files` you specify.
20
+
21
+
The default file for the contributor table is your `README.md`.
19
22
20
23
### `all-contributors add`
21
24
22
-
Use `add` to add new contributors to your project, or add new ways in which they
23
-
have contributed. They will be added to your configuration file, and the
25
+
Use the `add` command to add:
26
+
* new contributors to your project, or
27
+
* add new ways in which they have contributed.
28
+
29
+
For instance, a user may have already contributed code, but after they add a documentation pull request you might want to add them for documentation too. The contributor will be added to your configuration file, and the
24
30
contributors file will be updated just as if you used the [generate command](#all-contributors-generate).
Where `username` is the user's GitHub or Gitlab username, and `contribution` is a
34
-
`,`-separated list of contributions. See the [Emoji Key (Contribution Types Reference)](../emoji-key)
40
+
`,`-separated list of contributions. See the [Emoji Key (Contribution Types Reference)](../../emoji-key)
35
41
for a list of valid `contribution` types.
36
42
37
-
> **GitLab Users**: See the [additional requirements for GitLab users](#gitlab-users)
43
+
<Asidetype="tip"> **GitLab Users**: See the [additional requirements for GitLab users](#gitlab-users) </Aside>
38
44
39
45
### `all-contributors check`
40
46
41
47
Use `check` to compare contributors from GitHub with the ones credited in your
42
48
`.all-contributorsrc` file, to make sure that credit is given where
43
49
it's due.
44
50
45
-
> Due to GitHub API restrictions, this command only works for projects with less
46
-
> than 500 contributors (Unless you set a `PRIVATE_TOKEN` as mentioned [below in GitHub users](#github-users)).
51
+
<Asidetype="note"> Due to GitHub API restrictions, this command only works for projects with less than 500 contributors (Unless you set a `PRIVATE_TOKEN` as mentioned [below in GitHub users](#github-users)). </Aside>
47
52
48
53
### `all-contributors generate`
49
54
@@ -73,17 +78,13 @@ In some cases you may see the error message `GitHub API rate limit exceeded for
73
78
## GitLab Users
74
79
75
80
Please note that if you are using a self-hosted GitLab instance,
76
-
some commands will need you to set an environment variable named `PRIVATE_TOKEN` first.
81
+
some commands will require you to set an environment variable named `PRIVATE_TOKEN` first.
77
82
78
-
> Private token is the personal access token to authenticate with the GitLab API.
83
+
<Asidetype="tip"> Private token is the personal access token to authenticate with the GitLab API.</Aside>
> Call for translators! [We're looking for translators](https://github.com/all-contributors/all-contributors/issues/143) to help translate this spec for everyone!
<Asidetype="tip">Call for translators! [We're looking for translators](https://github.com/all-contributors/all-contributors/issues/143) to help translate this spec for everyone!</Aside>
8
14
9
15
## Help improve the all-contributors documentation!
10
16
@@ -20,12 +26,14 @@ If you're not used to it or are afraid to mistype a commit, you can run `npm run
20
26
21
27
## Editing Content
22
28
23
-
> **Pro Tip**: Every page has an _Edit_ button up the top, clicking this will take you straight to the GitHub source code for that page
29
+
<Asidetype="tip">Every page has an _Edit_ button up the top, clicking this will take you straight to the GitHub source code for that page</Aside>
24
30
25
31
Once on a file, click the 'pencil' icon to [easily edit the file inline](https://help.github.com/articles/editing-files-in-your-repository/)
26
-
<divalign="center">
27
-
<img src="/images/edit-this-page.png" alt="Example on how to edit a page" width="800px" />
28
-
</div>
32
+
After making your changes, scroll to the bottom of the page to create a commit with your changes. You will want to create and commit these changes on a new branch in your fork of the repository.
33
+
34
+
After committing your changes, you can create a pull request to propose your changes to be merged into the main branch.
35
+
36
+
<Picturesrc={editPage}formats={['avif', 'webp']}alt="A screenshot that shows the GitHub interface with a file open focused on the pencil icon that allows you to edit the page." />
29
37
30
38
## Translations
31
39
@@ -35,7 +43,8 @@ Our translations are managed through crowdin. You can help contribute by heading
35
43
If you like, [comment on this issue](https://github.com/all-contributors/all-contributors/issues/143) to let us know you're helping or if you have any queries!
36
44
37
45
> When translating, anything that has the [XPATH](https://developer.mozilla.org/en-US/docs/Web/XPath)`@href`, `@src` etc mustn't be translated. Things like `code` should not be either. This will cause the project to 404. See the below image for an example:
38
-
<img src="/images/translating-xpath.png" alt="Contribute to translating" />
46
+
47
+
<Picturesrc={translating}formats={['avif', 'webp']}alt="A screenshot that shows the GitHub interface with a file open focused on the pencil icon that allows you to edit the page." />
39
48
40
49
> However, it's recommended to translate any content that would contribute to a better comprehension like the comments in `code` tags _as long as_ it doesn't change the actual code since it only understands English.
41
50
@@ -56,11 +65,7 @@ If you like, [comment on this issue](https://github.com/all-contributors/all-con
56
65
57
66
### Change deployments
58
67
59
-
After you translate strings in any given language, you won't see those changes appearing live until the `master` branch was updated followed by a successful deployment.
60
-
61
-
## Search
62
-
63
-
Search is by algolia, the configuration is at <https://github.com/algolia/docsearch-configs/blob/main/configs/all-contributors.json>
68
+
After you translate strings in any given language, you won't see those changes appearing live until the `main` branch was updated followed by a successful deployment.
64
69
65
70
## Run the website locally:
66
71
@@ -95,22 +100,16 @@ Once you have completed the above, you can launch a server locally that will bui
95
100
### Make changes - linting your contribution
96
101
97
102
If you make changes to a markdown file in the site, then our linting action will
98
-
check those changes. To run the linter yourself on a file locally:
99
-
100
-
First install markdownlint-cli:
103
+
check those changes. To run the linter yourself locally on the documentation before submitting a PR use:
101
104
102
-
`npm i -g markdownlint-cli`
105
+
`npm run lint`
103
106
104
-
Then run markdownlint on the file (or files) that you wish to check:
107
+
You can also run it manually on specific files like this:
0 commit comments