Skip to content

Commit

Permalink
switched to jsdelivr instead of unpkg for CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
dagnelies committed Jul 13, 2024
1 parent 42b2b25 commit 78ed32a
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import * as webauthn from '@passwordless-id/webauthn'

```html
<script type="module">
import { client } from 'https://unpkg.com/@passwordless-id/webauthn@1.6.1/dist/webauthn.min.js'
import { client } from 'https://cdn.jsdelivr.net/npm/@passwordless-id/webauthn@1'
</script>
```
### Import
Expand Down
2 changes: 1 addition & 1 deletion demos/example-cdn.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


<script type="module">
import { client } from 'https://unpkg.com/@passwordless-id/webauthn@1.6.1/dist/webauthn.min.js'
import { client } from 'https://cdn.jsdelivr.net/npm/@passwordless-id/webauthn@1'

window.register = async function() {
console.log('Registering...')
Expand Down
2 changes: 1 addition & 1 deletion dist/webauthn.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/webauthn.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "@passwordless-id/webauthn",
"version": "1.6.1",
"version": "1.6.2",
"description": "A small wrapper around the webauthn protocol to make one's life easier.",
"type": "module",
"main": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"browser": "dist/webauthn.min.js",
"unpkg": "dist/webauthn.min.js",
"scripts": {
"build": "tsc && esbuild src/index.ts --platform=neutral --bundle --sourcemap --minify --target=es2022 --outfile=dist/webauthn.min.js",
Expand All @@ -27,6 +28,7 @@
"url": "https://github.com/passwordless-id/webauthn/issues"
},
"homepage": "https://webauthn.passwordless.id",
"funding": "https://github.com/sponsors/passwordless-id",
"devDependencies": {
"@babel/preset-typescript": "^7.21.4",
"@types/jest": "^29.2.3",
Expand Down

0 comments on commit 78ed32a

Please sign in to comment.