We prefer using pnpm for installing dependencies and running scripts.
The main branch is locked for the push action. For proposing changes, use the standard pull request approach. It's recommended to discuss fixes or new functionality in the Issues, first.
There are 4 demo pages for this integration:
- In
/examples/create-react-appfolder. It is a rich demo with scenarios of using different caching strategies. You can find more info about configuration and starting demo in the readme. - In
/examples/nextfolder. It is a demo built with NextJS that allows testing SSR scenarios. You can find more info about configuration and starting demo in the readme. - In
/examples/next-appDirfolder. It is the same demo built with NextJS, but with newappdirectory approach. You can find more info about configuration and starting demo in the readme. - In
/examples/preactfolder. It is a demo built with Preact. You can find more info about configuration and starting demo in the readme. - In
/examples/webpack-basedfolder. It is a simple demo built with raw webpack.
❗ Build projects before testing integration. First build the @fingerprint/react package, and then start any of the example apps.
Just run:
pnpm buildThe code style is controlled by ESLint and Prettier. Run to check that the code style is ok:
pnpm lintYou aren't required to run the check manually, the CI will do it. Run the following command to fix style issues (not all issues can be fixed automatically):
pnpm lint:fixTests are located in __tests__ folder and run by vitest in jsdom environment.
To run tests you can use IDE instruments or just run:
pnpm testTo check the distributive TypeScript declarations, build the project and run:
pnpm test:dtsThe library is automatically released and published to NPM on every push to the main branch if there are relevant changes using semantic-release with following plugins:
- @semantic-release/commit-analyzer
- @semantic-release/release-notes-generator
- @semantic-release/changelog
- @semantic-release/npm
- @semantic-release/github
The workflow must be approved by one of the maintainers, first.