- Typescript support
- Jest setup
- Lint using ESLint
- Prettier integration
- Docs generation using typedoc with deployment to GitHub Pages
- Automated releases using semantic-release
- Conventional commits with commit lint using git hooks
- Clone this repository, remove
.git
folder and callgit init
/ UseUse this template
GitHub button - Setup project specific fields in package.json
- Setup
artifactName
and other build properties inrollup.config.js
- If your project emits
.d.ts
typings, set correct path inpackage.json
fortest:dts
command or remove it - Use
src
folder to organize your code and put tests in__test__
folder - If you want isolated run you can use Docker
- Push your repo, check that GitHub actions works
- Add badges
- You are awesome!
Check FingerprintJS naming conventions
Described in Integrations and repositories best practices
For unit tests, we use jest, because of the good infrastructure, flexible instruments for mocks and big community.
This repository contains example of how to configure code coverage reporting without SaaS solutions like codecov (such solutions require token with full access to the repository). In PR#13 you can find what you need to configure:
- workflow to update the coverage badge in the readme and publish a full report for the main branch
- workflow to add a comment to pr with coverage of the current branch and diff with main
For API reference we use typedoc
package and publish documentation in GitHub Pages.
Publishing to NPM is automated thanks to semantic-release.
On every push to main
branch it will analyze commits and release new version accordingly to changes.
To set it up:
- Add
NPM_AUTH_TOKEN
to the repository secrets area - Add
GH_RELEASE_TOKEN
to the repository secrets area, it should have following permissions:public_repo
, orrepo
if your repository is private. Thanks to that, you will get automatic releases on GitHub, comments on issues and more! - Package will publish automatically to NPM when there are relevant changes
- You are awesome!
Just follow checklist for publishing new integration