Skip to content

Commit e58e414

Browse files
author
Jérôme Deuchnord
committed
Fix the contribution guide
1 parent ab486e8 commit e58e414

File tree

1 file changed

+27
-43
lines changed

1 file changed

+27
-43
lines changed

CONTRIBUTING.md

Lines changed: 27 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,32 @@ Then, if it appears that it's a real bug, you may report it using Github by foll
2020
2121
## Pull requests
2222

23-
### Writing a Pull Request
24-
25-
First of all, you must decide on what branch your changes will be based. If the changes your are going to make are
26-
fully backward-compatible, you should base your changes on the latest stable branch.
27-
Otherwise, you should base your changes on the `master` branch.
28-
2923
### Installing the source version
3024

31-
To install the source version of API Platform Admin in your project and contribute a patch, run the following command:
25+
To install the source version of the Client Generator in your project and contribute a patch, run the following command:
3226

33-
# Link the source version of API Platform admin
34-
$ cd ..
35-
$ git clone [email protected]:api-platform/admin.git -b the-latest-stable-branch
36-
$ cd admin
37-
$ yarn link
38-
$ cd ../yourpoject
39-
$ yarn link api-platform-admin
40-
# Use the React version of your project to build API Platform admin
41-
$ cd node_modules/react
42-
$ yarn link
43-
$ cd ../../../admin
44-
$ yarn link react
45-
$ yarn watch
27+
```console
28+
$ git clone [email protected]:api-platform/client-generator.git
29+
$ cd client-generator
30+
```
4631

47-
You can now hack in the cloned repository of `api-platform-admin`.
32+
You can now hack in the cloned repository of `client-generator`. If you want to test your work, a `lib/index.js` file containing your last changes will be created each time you invoke `yarn build`. You can also use `yarn watch` to make it created each time a change is performed in your code!
4833

4934
### Testing your changes
5035

5136
Before sending a Pull Request, make sure the tests pass correctly:
5237

53-
```bash
54-
yarn test
38+
```console
39+
$ yarn test
5540
```
5641

5742
### Matching coding standards
5843

59-
The API Platform Admin project is inspired by the [Airbnb JavaScript style guide](https://github.com/airbnb/javascript).
44+
The Client Generator project is inspired by the [Airbnb JavaScript style guide](https://github.com/airbnb/javascript).
6045
But don't worry, you can fix CS issues automatically using [ESLint](https://eslint.org/) tool:
6146

62-
```bash
63-
yarn fix
47+
```console
48+
$ yarn fix
6449
```
6550

6651
And then, add fixed file to your commit before push.
@@ -70,11 +55,10 @@ Be sure to add only **your modified files**. If another files are fixed by cs to
7055

7156
When you send a PR, just make sure that:
7257

73-
* You add valid test cases (Behat and PHPUnit).
58+
* You add valid test cases and run them (`yarn test`).
7459
* Tests are green.
7560
* You make a PR on the related documentation in the [api-platform/doc](https://github.com/api-platform/doc) repository.
76-
* You make the PR on the same branch you based your changes on. If you see commits
77-
that you did not make in your PR, you're doing it wrong.
61+
* You make the PR on the same branch you based your changes on. If you see commits that you did not make in your PR, you're doing it wrong.
7862
* Also don't forget to add a comment when you update a PR with a ping to [the maintainer](https://github.com/orgs/api-platform/people), so he/she will get a notification.
7963
* Squash your commits into one commit. (see the next chapter)
8064

@@ -97,8 +81,8 @@ All Pull Requests must include the following header:
9781

9882
If you have 3 commits. So start with:
9983

100-
```bash
101-
git rebase -i HEAD~3
84+
```console
85+
$ git rebase -i HEAD~3
10286
```
10387

10488
An editor will be opened with your 3 commits, all prefixed by `pick`.
@@ -111,34 +95,34 @@ After that, all your commits where squashed into the first one and the commit me
11195

11296
If you would like to rename your commit message type:
11397

114-
```bash
115-
git commit --amend
98+
```console
99+
$ git commit --amend
116100
```
117101

118102
Now force push to update your PR:
119103

120-
```bash
121-
git push --force
104+
```console
105+
$ git push --force
122106
```
123107

124108
# Tag a new version (contributors only)
125109

126110
Always test before releasing a new one:
127111

128-
```
129-
yarn build
130-
yarn test
131-
yarn lint
112+
```console
113+
$ yarn build
114+
$ yarn test
115+
$ yarn lint
132116
```
133117

134118
To fix linting errors, you can use `yarn fix`.
135119

136120
To release a new version:
137121

138-
```bash
139-
yarn version # this creates a tag
140-
git push
141-
git push --tags
122+
```console
123+
$ yarn version # this creates a tag
124+
$ git push
125+
$ git push --tags
142126
```
143127

144128
Travis will then publish the version on npm.

0 commit comments

Comments
 (0)