Skip to content

Commit 39bcfbf

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

File tree

1 file changed

+28
-43
lines changed

1 file changed

+28
-43
lines changed

CONTRIBUTING.md

Lines changed: 28 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,33 @@ 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 API Platform Client Generator in your project and contribute a patch, run the following commands:
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+
$ yarn watch
31+
```
4632

47-
You can now hack in the cloned repository of `api-platform-admin`.
33+
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!
4834

4935
### Testing your changes
5036

5137
Before sending a Pull Request, make sure the tests pass correctly:
5238

53-
```bash
54-
yarn test
39+
```console
40+
$ yarn test
5541
```
5642

5743
### Matching coding standards
5844

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

62-
```bash
63-
yarn fix
48+
```console
49+
$ yarn fix
6450
```
6551

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

7157
When you send a PR, just make sure that:
7258

73-
* You add valid test cases (Behat and PHPUnit).
59+
* You add valid test cases (you can run them using `yarn test`).
7460
* Tests are green.
7561
* 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.
62+
* 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.
7863
* 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.
7964
* Squash your commits into one commit. (see the next chapter)
8065

@@ -97,8 +82,8 @@ All Pull Requests must include the following header:
9782

9883
If you have 3 commits. So start with:
9984

100-
```bash
101-
git rebase -i HEAD~3
85+
```console
86+
$ git rebase -i HEAD~3
10287
```
10388

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

11297
If you would like to rename your commit message type:
11398

114-
```bash
115-
git commit --amend
99+
```console
100+
$ git commit --amend
116101
```
117102

118103
Now force push to update your PR:
119104

120-
```bash
121-
git push --force
105+
```console
106+
$ git push --force
122107
```
123108

124109
# Tag a new version (contributors only)
125110

126111
Always test before releasing a new one:
127112

128-
```
129-
yarn build
130-
yarn test
131-
yarn lint
113+
```console
114+
$ yarn build
115+
$ yarn test
116+
$ yarn lint
132117
```
133118

134119
To fix linting errors, you can use `yarn fix`.
135120

136121
To release a new version:
137122

138-
```bash
139-
yarn version # this creates a tag
140-
git push
141-
git push --tags
123+
```console
124+
$ yarn version # this creates a tag
125+
$ git push
126+
$ git push --tags
142127
```
143128

144129
Travis will then publish the version on npm.

0 commit comments

Comments
 (0)