Skip to content

Commit

Permalink
Update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
OliEfr authored Oct 2, 2024
1 parent e990366 commit 5d21c63
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
# Contributing

- before implementing a feature communicate with us via [Matrix](https://matrix.to/#/#tu-fast:tu-dresden.de) or GitHub
- commit any feature containing pull requests against the develop-branch
- commit any hot-fixes against main-branch
TL;DR
- Before implementing a feature communicate with us via GitHub-Issues or Pull Requests. Code maintainers often have good suggestions regarding the implementation.
- Commit any changes (new features or hot-fixes) directly against the main branch.

## Getting started with browser extensions

If you never worked with browser extensions before, you should read this very [nice tutorial](https://developer.chrome.com/docs/extensions/get-started). Alternatively you can use the instructions from [mozilla](https://developer.mozilla.org/de/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension). Make sure you understand the difference between content- and background-scripts, their scopes and how they can exchange information with messaging.

## Working with this repo

Everything related to the browser extension can be found in `/src`: `manifest.json`, background-script (`background.js`) and so on. Content scripts are in `/src/contentScripts`. In `/src/freshContent` you can find newly created content that is used in TUfast, e.g. the popup or settings-page. `/docs` does _not_ contain documentation for the code, but further instructions for users of TUfast.
Everything related to the browser extension can be found in `/src`: the `manifest.json`, the `background.js` and so on. Content scripts are in `/src/contentScripts`. In `/src/freshContent` you can find newly created content that is used in TUfast, e.g. the popup or settings-page. `/docs` does _not_ contain documentation for the code, but further instructions for users of TUfast.

Steps to contribute (that's standard [Gitflow Workflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)):
Steps to contribute:

1. Create a local clone of this repo `git clone <url-of-your-repo>`.
2. Checkout develop branch `git checkout develop`.
3. Create new feature branch from develop `git checkout -b <my_new_feature_branch>`.
1. Create your local clone of this repo `git clone <url-of-your-repo>`.
3. Create a new feature branch directly from the main branch `git checkout -b <my_new_feature_branch>`.
4. Install dependencies `npm ci`. (You need node package manager `npm` installed.)
5. Run `npm run useChrome` or `npm run useFF` to select the browser you are developing for - this will copy the corresponding manifest.json.
6. Run `npm run dev` while developing. This is will compile `.sass` and `.ts` files and watch for changes in your working tree.
7. Load the `./build` directory as an unpacked extension in your browser to test the extension.
8. Run tests locally before committing code: `npm run test`.
9. **Increase the version number of the package according to [SemVer](https://semver.org/).**
10. Create a pull request against `develop`.
9. **Increase the version number in the `manifest*.json` files according to [SemVer](https://semver.org/). An increase in version number is strictly required beforere releasing a new version!**
10. Create a pull request against `main`.
11. Await our review.

**Note:** as a member of TUfast you can work in this repo directly, e.g. you can create branches and push to them, making the contribution process easier.
**Note:** as a member of the TUfast organization you can also work in this repo directly, e.g. you can create branches and push to them, making the contribution process easier.

## Used frameworks
- Build tool: [Snowpack](https://www.snowpack.dev/). Run `npm run dev` to compile sass and ts files.
Expand Down

0 comments on commit 5d21c63

Please sign in to comment.