Skip to content

Commit

Permalink
docs: add contributing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Apr 6, 2022
1 parent 788c3f5 commit 2172bf4
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contributing to FingerprintJS Pro SPA integration

## Working with code

We prefer to use [yarn](https://yarnpkg.com/) for installing dependencies and running scripts

Main branch is locked for push, so use branches to make changes and create pull request to review code and merge it in main.

### Development playground

There is no specific playground for this library, but you can develop it with [fingerprintjs-pro-react](https://github.com/fingerprintjs/fingerprintjs-pro-react), just [link package](https://yarnpkg.com/cli/link) with `yarn link`.

❗ Build project before testing integration

### How to build
Just run:
```shell
yarn build
```

### Code style

The code style is controlled by [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). Run to check that the code style is ok:
```shell
yarn lint
```

You aren't required to run the check manually, the CI will do it. Run to fix code style mistakes (not all mistakes can be fixed automatically):
```shell
yarn lint:fix
```

### How to test
Tests located in `__tests__` folder and run by [jest](https://jestjs.io/) in [jsdom](https://github.com/jsdom/jsdom) environment.

To run tests you can use IDE instruments or just run:
```shell
yarn test
```

To check the distributive TypeScript declarations, build the project and run:
```shell
yarn test:dts
```

### How to publish
- Create new brunch
- Run `yarn release:(major|minor|patch)` depending on version you need
- Make PR
- After merging PR in main, GitHub action will new version to npm

0 comments on commit 2172bf4

Please sign in to comment.