Skip to content

Commit 4ba5283

Browse files
committed
minor #117 Add contributing guide (Kocal)
This PR was merged into the main branch. Discussion ---------- Add contributing guide Commits ------- 48539b6 Add contributing guide
2 parents aa49651 + 48539b6 commit 4ba5283

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* Migrate from [Yarn](https://yarnpkg.com/) to [pnpm](https://pnpm.io/) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/108
2525
* Migrate from [Jest](https://jestjs.io/) to [Vitest](https://vitest.dev/) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/115
2626
* Migrate or remove [Babel](https://babeljs.io/) in favor of [Acorn](https://github.com/acornjs/acorn) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/116
27+
* Add a contribution guide by @Kocal in https://github.com/symfony/stimulus-bridge/pull/117
2728

2829
## 3.3.3
2930

CONTRIBUTING.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributing
2+
3+
Thank you for considering contributing to the Symfony's Stimulus Bridge!
4+
5+
The Symfony's Stimulus Bridge is an open source, community-driven project, and we are happy to receive contributions from the community!
6+
7+
> [!TIP]
8+
> It's a good idea to read the [Symfony's Contribution Guide](https://symfony.com/doc/current/contributing/index.html) first, even if not all of it applies here and should be adapted to this project (e.g.: there is a single base branch, `main`).
9+
10+
## Reporting an issue
11+
12+
If you either find a bug, have a feature request, or need help/have a question, please [open an issue](https://github.com/symfony/stimulus-bridge/issues/new/choose).
13+
14+
Please provide as much information as possible,
15+
and remember to follow our [Code of Conduct](https://symfony.com/doc/current/contributing/code_of_conduct/index.html)
16+
as well, to ensure a friendly environment for all contributors.
17+
18+
## Contributing to the code and documentation
19+
20+
Thanks for your interest in contributing to Symfony UX! Here are some guidelines to help you get started.
21+
22+
### Forking the repository
23+
24+
To contribute to Symfony's Stimulus Bridge, you need to [fork the **symfony/stimulus-bridge** repository](https://github.com/symfony/stimulus-bridge/fork) on GitHub.
25+
This will give you a copy of the code under your GitHub user account, read [the documentation "How to fork a repository"](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo).
26+
27+
After forking the repository, you can clone it to your local machine:
28+
29+
```shell
30+
$ git clone [email protected]:<USERNAME>/symfony-ux.git symfony-ux
31+
$ cd symfony-ux
32+
# Add the upstream repository, to keep your fork up-to-date
33+
$ git remote add upstream [email protected]:symfony/stimulus-bridge.git
34+
```
35+
36+
### Setting up the development environment
37+
38+
To set up the development environment, you need the following tools:
39+
40+
- [Node.js](https://nodejs.org/en/download/package-manager) 18 or higher
41+
42+
With these tools installed, you can install the project dependencies:
43+
44+
```shell
45+
$ corepack enable
46+
$ pnpm install
47+
```
48+
49+
### Linking into a Symfony project
50+
51+
To test your changes in a Symfony project, you can link the package into a Symfony project by running the following commands:
52+
53+
```shell
54+
# Execute in the Symfony's Stimulus Bridge repository
55+
npm link
56+
57+
# Execute in the Symfony project
58+
npm link @symfony/stimulus-bridge
59+
```
60+
61+
## Useful Git commands
62+
63+
1. To keep your fork up-to-date with the upstream repository and `main` branch, you can run the following commands:
64+
```shell
65+
$ git checkout main && \
66+
git fetch upstream && \
67+
git rebase upstream/main && \
68+
git push origin main
69+
```
70+
71+
2. To rebase your branch on top of the `main` branch, you can run the following commands:
72+
```shell
73+
$ git checkout my-feature-branch && \
74+
git rebase upstream/main && \
75+
git push -u origin my-feature-branch
76+
```

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,3 +297,7 @@ Uncaught (in promise) TypeError: class constructors must be invoked with 'new'
297297
The error is caused when an ES5 class tries to "extend" an ES6 class. If the target is not correctly set,
298298
TypeScript will transpile the controller to old ES5 code. But Stimulus 3 uses pure ES6 classes.
299299
This causes an incompatibility, hence the need to target ES6 explicitly.
300+
301+
## Contributing
302+
303+
Thank you for considering contributing to the Symfony's Stimulus Bridge! You can find the [contribution guide here](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)