Skip to content

Commit e93e243

Browse files
committed
docs: restore contribution guide
1 parent 928dde7 commit e93e243

1 file changed

Lines changed: 48 additions & 51 deletions

File tree

CONTRIBUTING.md

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,68 @@
1-
# Contributing to DocSearch
1+
Hi (future) collaborator!
22

3-
Welcome to the contributing guide for DocSearch!
3+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
4+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
45

5-
If this guide does not contain what you are looking for and thus prevents you from contributing, don't hesitate to leave a message on the [Discord](https://discord.gg/bRTacwYrfX) or to [open an issue](https://github.com/algolia/docsearch/issues).
66

7-
## Reporting an issue
7+
- [Where to start?](#where-to-start)
8+
- [Development workflow](#development-workflow)
9+
- [Requirements](#requirements)
10+
- [Build](#build)
11+
- [Serve](#serve)
12+
- [Test](#test)
13+
- [Docs](#docs)
14+
- [Release](#release)
815

9-
Opening an issue is very effective way to contribute because many users might also be impacted. We'll make sure to fix it quickly if it's technically feasible and doesn't have important side effects for other users.
16+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
1017

11-
Before reporting an issue, first check that there is not an already open issue for the same topic using the [issues page](https://github.com/algolia/docsearch/issues). Don't hesitate to thumb up an issue that corresponds to the problem you have.
18+
# Where to start?
1219

13-
Another element that will help us go faster at solving the issue is to provide a reproducible test case. We recommend to [use this CodeSandbox template](https://codesandbox.io/s/github/algolia/docsearch/tree/main/examples/demo).
20+
Have a fix or a new feature? Search for corresponding issues first, then create a new one if needed.
1421

15-
## Code contribution
22+
# Development workflow
1623

17-
For any code contribution, you need to:
18-
19-
- Fork and clone the project
20-
- Create a new branch for what you want to solve (fix/_issue-number_, feat/_name-of-the-feature_)
21-
- Make your changes
22-
- Open a pull request
23-
24-
Then:
25-
26-
- A team member will review the pull request
27-
- Automatic checks will be run
28-
29-
When every check is green and a team member approves, your contribution is merged! 🚀
30-
31-
## Commit conventions
32-
33-
This project follows the [conventional changelog](https://conventionalcommits.org/) approach. This means that all commit messages should be formatted using the following scheme:
34-
35-
```
36-
type(scope): description
37-
```
24+
## Requirements
3825

39-
In most cases, we use the following types:
26+
To run this project, you will need:
4027

41-
- `fix`: for any resolution of an issue (identified or not)
42-
- `feat`: for any new feature
43-
- `refactor`: for any code change that neither adds a feature nor fixes an issue
44-
- `docs`: for any documentation change or addition
45-
- `chore`: for anything that is not related to the library itself (doc, tooling)
28+
- Node.js >= v8.7.0, use nvm - [install
29+
instructions][15]
30+
- Yarn
4631

47-
Even though the scope is optional, we try to fill it in as it helps us better understand the impact of a change.
32+
## Build
4833

49-
Finally, if your work is based on an issue on GitHub, please add in the body of the commit message "fix #1234" if it solves the issue #1234 (read "[Closing issues using keywords](https://help.github.com/en/articles/closing-issues-using-keywords)").
34+
`yarn run build` will build all files in `./dist`. This includes regular and
35+
minified files for `<script>` inclusion, as well as classes for `import`ing.
5036

51-
Some examples of valid commit messages (used as first lines):
37+
The command itself is split into `yarn run build:js` and `yarn run build:css` if
38+
you want to build a subset.
5239

53-
> - fix(searchbox): add `type` input property
54-
> - chore(deps): update dependency rollup-plugin-babel to v3.0.7
55-
> - fix(modal): increase default height
56-
> - docs(contributing): reword release section
40+
## Serve
5741

58-
## Requirements
42+
You can have all this files served on localhost, along with live-reload, with
43+
the `yarn run serve` command.
5944

60-
To run this project, you will need:
45+
## Test
6146

62-
- Node.js ≥ 18 – [nvm](https://github.com/nvm-sh/nvm#install-script) is recommended
63-
- [Yarn](https://yarnpkg.com)
47+
You can run all tests with `yarn run test`, and `yarn run test:watch` will run
48+
them with auto-reload.
6449

6550
## Release
6651

67-
```sh
68-
yarn run release
69-
```
70-
71-
It will create a pull request for the next release. When it's reviewed, approved and merged, then CircleCI will automatically publish it to npm.
52+
`npm run release` will guide you through the release process. Note that you have
53+
to use `npm` and not `yarn` for this one otherwise it won't deploy to npm.
54+
55+
[1]: #where-to-start
56+
[2]: #development-workflow
57+
[3]: #requirements
58+
[4]: #launch
59+
[5]: #local-build
60+
[6]: #commit-message-guidelines
61+
[7]: #revert
62+
[8]: #type
63+
[9]: #scope
64+
[10]: #subject
65+
[11]: #body
66+
[12]: #footer
67+
[13]: #releasing
68+
[15]: https://github.com/creationix/nvm#install-script

0 commit comments

Comments
 (0)