Skip to content

Commit

Permalink
chore: update webpack-based example
Browse files Browse the repository at this point in the history
  • Loading branch information
JuroUhlar committed Mar 19, 2024
1 parent 57b309a commit 1c48a19
Show file tree
Hide file tree
Showing 8 changed files with 1,959 additions and 2,530 deletions.
2 changes: 1 addition & 1 deletion examples/create-react-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Fingerprint Public API key

In order to try out these examples:
In order to try out this example:
1. Create a `.env` (or `.env.local`) file in this directory.
2. Set the `REACT_APP_FPJS_PUBLIC_API_KEY` environment variable to the value of your Fingerprint Public API key.

Expand Down
2 changes: 1 addition & 1 deletion examples/next-appDir/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ See [../next](../next/README.md) for an example using the classic `pages` approa

### Fingerprint Public API key

In order to try out these examples:
In order to try out this example:
1. Create a `.env` (or `.env.local`) file in this directory.
2. Set the `NEXT_PUBLIC_FPJS_PUBLIC_API_KEY` environment variable to the value of your Fingerprint Public API key.

Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion examples/webpack-based/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
dist/
node_modules/
node_modules/
.env
.env.local
28 changes: 28 additions & 0 deletions examples/webpack-based/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Fingerprint Pro Webpack Example

This example demonstrates the usage of Fingerprint Pro inside a webpack-based project.

## Setting up

### Fingerprint Public API key

In order to try out this example:
1. Create a `.env` (or `.env.local`) file in this directory.
2. Set the `REACT_APP_FPJS_PUBLIC_API_KEY` environment variable to the value of your Fingerprint Public API key.

To get the API key:

- Go to Fingerprint Dashboard > [API Keys](https://dashboard.fingerprint.com/api-keys) and find it there.
- If you don't have a Fingerprint Pro account, [sign up for free](https://dashboard.fingerprint.com/signup/).

### Installing dependencies

1. Go to the root of the project, install dependencies and build it (`cd ../../ && pnpm install && pnpm build`)
2. Come back to the example folder (`cd examples/webpack-based`) and run `pnpm install`.

After you've completed all the steps and inserted the API key, you can run:

### `pnpm dev`

Runs the app in the development mode.\
Open [http://localhost:8080](http://localhost:8080) to view it in the browser.
8 changes: 4 additions & 4 deletions examples/webpack-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"build": "webpack"
},
"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/core": "^7.24.0",
"@babel/preset-env": "^7.24.0",
"@babel/preset-react": "^7.23.3",
"babel-loader": "^9.1.3",
"dotenv-webpack": "^8.0.1",
"html-webpack-plugin": "^5.6.0",
"webpack": "^5.90.0",
"webpack": "^5.90.3",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"webpack-dev-server": "^5.0.3"
},
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-react": "workspace:*"
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
},
"homepage": "https://github.com/fingerprintjs/fingerprintjs-pro-react#readme",
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-spa": "^1.2.0",
"@fingerprintjs/fingerprintjs-pro-spa": "^1.3.0",
"fast-deep-equal": "3.1.3"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/cli": "^19.2.0",
"@fingerprintjs/commit-lint-dx-team": "^0.0.2",
"@fingerprintjs/conventional-changelog-dx-team": "^0.1.0",
"@fingerprintjs/eslint-config-dx-team": "^0.1.0",
Expand All @@ -66,39 +66,39 @@
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-typescript": "^11.1.6",
"@testing-library/preact": "^3.2.3",
"@testing-library/react": "^14.1.2",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^27.5.2",
"@types/node": "^20.11.6",
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"@typescript-eslint/eslint-plugin": "^5.50.0",
"@typescript-eslint/parser": "^5.50.0",
"commitizen": "^4.2.4",
"@testing-library/react": "^14.2.1",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.28",
"@types/react": "^18.2.66",
"@types/react-dom": "^18.2.22",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"commitizen": "^4.3.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.0.0",
"eslint-config-next": "14.1.0",
"eslint": "^8.57.0",
"eslint-config-next": "14.1.3",
"eslint-config-preact": "^1.3.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react": "7.34.0",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.1",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"lint-staged": "^13.0.3",
"preact": "^10.11.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"lint-staged": "^15.2.2",
"preact": "^10.19.6",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.2",
"react-router-dom": "^6.22.3",
"rimraf": "^5.0.5",
"rollup": "^4.9.6",
"rollup": "^4.13.0",
"rollup-plugin-banner2": "^1.2.2",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-license": "^3.2.0",
"rollup-plugin-license": "^3.3.1",
"rollup-plugin-peer-deps-external": "^2.2.4",
"ts-jest": "^27.1.5",
"ts-jest": "^29.1.2",
"tslib": "^2.6.2",
"typedoc": "^0.25.7",
"typescript": "^5.3.3"
"typedoc": "^0.25.12",
"typescript": "^5.4.2"
},
"lint-staged": {
"*.ts": "yarn run lint:fix",
Expand Down
Loading

0 comments on commit 1c48a19

Please sign in to comment.