Skip to content

Latest commit

 

History

History
136 lines (93 loc) · 4.21 KB

CONTRIBUTING.md

File metadata and controls

136 lines (93 loc) · 4.21 KB

Contributing Guide

Thank you for investing your time in contribution to the dokieli project!

The linkeddata/dokieli repository contains the source code of the work on dokieli project.

Dive into contributing

  • Use it. Break it. Report it. Fix it.
  • Improve documentation (for the website or repository)
  • Publish or translate articles and share them. Add yours to the examples in the wild.
  • Join the dokieli chat for help and discussion.
  • Encourage the ideas/movement and however else you want to contribute.
  • We want your feedback! Create issues (or PRs!) for use cases or features or you would like to have.

Code of conduct

We have a Code of Conduct to help keep our community inclusive, welcoming, and friendly.

See additional resources for education and training to promote a positive work environment.

Development

  • General background in dokieli documentation.
  • See fork a repo to setup your own development repository and stay synchronised. Useful later to make pull requests. For example, using your fork at https://github.com/YOUR-USERNAME/dokieli :

Clone your work repository, for example:

git clone git@github.com:YOUR-USERNAME/dokieli
cd dokieli

Install packages:

yarn

Make your code updates at src/ , media/ etc.

Build eg. to create scripts/dokieli.js:

yarn build

or automatically rebuild when files change:

yarn watch

or create a minified scripts/dokieli.js:

yarn minify

To serve static files, you can use any HTTP server, e.g.:

npx serve

Tests

Unit tests

dokieli uses Jest for unit tests.

To run unit tests, run:

yarn test

Coverage reports are collected in tests/coverage.

End-to-end tests

In order to ensure intended and consistent behaviour across web browsers, dokieli uses Playwright for end-to-end browser tests.

To run end-to-end tests, run:

yarn test:e2e

Reports are collected in playwright-report/.

Some tests require authentication. To run these tests, you will need to have an .env file with credentials. See the .env.example file.

Code quality

We use eslint to enforce consistent code style and catch potential errors in our JavaScript code. To lint our code, run:

yarn lint

We use a husky pre-commit hook to run tests and lint before every commit. To opt-in, run:

yarn husky

You only need to run this once. After this, husky will run the linter and the tests each time you make a commit.

Creating a pull request

  • Include atomic commits, small PRs: "one concern, one PR".
  • In the PR comment, provide as much context and evidence to help reviewers evaluate the PR. Identify, classify, describes the changes.
  • Don't forget to link PR to issue if you are solving one.
  • If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.
  • You can attribute a commit to more than one author by adding one or more Co-authored-by: Name <name@example.com> per line to commit's message (after two empty lines). See github tutorial.
  • To help maintain a clean Git history, consider using squash merge for PRs, especially when incorporating reviews and code additions.

Your PR is merged! okieli dokieli 🎉 Thank you! ✨.