Skip to content

Commit

Permalink
minor #117 Add contributing guide (Kocal)
Browse files Browse the repository at this point in the history
This PR was merged into the main branch.

Discussion
----------

Add contributing guide

Commits
-------

48539b6 Add contributing guide
  • Loading branch information
Kocal committed Jan 29, 2025
2 parents aa49651 + 48539b6 commit 4ba5283
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Migrate from [Yarn](https://yarnpkg.com/) to [pnpm](https://pnpm.io/) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/108
* Migrate from [Jest](https://jestjs.io/) to [Vitest](https://vitest.dev/) by @Kocal in https://github.com/symfony/stimulus-bridge/pull/115
* 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
* Add a contribution guide by @Kocal in https://github.com/symfony/stimulus-bridge/pull/117

## 3.3.3

Expand Down
76 changes: 76 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributing

Thank you for considering contributing to the Symfony's Stimulus Bridge!

The Symfony's Stimulus Bridge is an open source, community-driven project, and we are happy to receive contributions from the community!

> [!TIP]
> 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`).
## Reporting an issue

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).

Please provide as much information as possible,
and remember to follow our [Code of Conduct](https://symfony.com/doc/current/contributing/code_of_conduct/index.html)
as well, to ensure a friendly environment for all contributors.

## Contributing to the code and documentation

Thanks for your interest in contributing to Symfony UX! Here are some guidelines to help you get started.

### Forking the repository

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.
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).

After forking the repository, you can clone it to your local machine:

```shell
$ git clone [email protected]:<USERNAME>/symfony-ux.git symfony-ux
$ cd symfony-ux
# Add the upstream repository, to keep your fork up-to-date
$ git remote add upstream [email protected]:symfony/stimulus-bridge.git
```

### Setting up the development environment

To set up the development environment, you need the following tools:

- [Node.js](https://nodejs.org/en/download/package-manager) 18 or higher

With these tools installed, you can install the project dependencies:

```shell
$ corepack enable
$ pnpm install
```

### Linking into a Symfony project

To test your changes in a Symfony project, you can link the package into a Symfony project by running the following commands:

```shell
# Execute in the Symfony's Stimulus Bridge repository
npm link

# Execute in the Symfony project
npm link @symfony/stimulus-bridge
```

## Useful Git commands

1. To keep your fork up-to-date with the upstream repository and `main` branch, you can run the following commands:
```shell
$ git checkout main && \
git fetch upstream && \
git rebase upstream/main && \
git push origin main
```

2. To rebase your branch on top of the `main` branch, you can run the following commands:
```shell
$ git checkout my-feature-branch && \
git rebase upstream/main && \
git push -u origin my-feature-branch
```
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,7 @@ Uncaught (in promise) TypeError: class constructors must be invoked with 'new'
The error is caused when an ES5 class tries to "extend" an ES6 class. If the target is not correctly set,
TypeScript will transpile the controller to old ES5 code. But Stimulus 3 uses pure ES6 classes.
This causes an incompatibility, hence the need to target ES6 explicitly.

## Contributing

Thank you for considering contributing to the Symfony's Stimulus Bridge! You can find the [contribution guide here](./CONTRIBUTING.md).

0 comments on commit 4ba5283

Please sign in to comment.