Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
taichunmin committed Oct 18, 2022
1 parent 60fddb1 commit 94486a9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 15 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# pn532.js

pn532.js is a PN532 js library base on Web Bluetooth and Web Serial.

> **Note:** This is early beta documentation that may be incomplete and is still under development.
pn532.js is a JavaScript library for PN532 base on Web Bluetooth and Web Serial.

## Browser & OS compatibility

Expand All @@ -16,6 +14,10 @@ For Linux and earlier versions of Windows, enable the `#experimental-web-platfor

The Web Serial API is available on all desktop platforms (ChromeOS, Linux, macOS, and Windows) in Chrome 89. See MDN's [Browser compatibility](https://developer.mozilla.org/docs/Web/API/Serial#browser_compatibility) table for more information.

### Web Serial API Polyfill

On Android, support for USB-based serial ports is possible using the WebUSB API and the [Serial API polyfill](https://github.com/google/web-serial-polyfill). This polyfill is limited to hardware and platforms where the device is accessible via the WebUSB API because it has not been claimed by a built-in device driver.

## Installing

Using jsDelivr CDN:
Expand All @@ -25,15 +27,15 @@ Using jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/npm/lodash@4/lodash.min.js"></script>

<!-- PN532.js Core -->
<script src="https://cdn.jsdelivr.net/gh/taichunmin/pn532.js@gh-pages/pn532.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pn532.js@0/dist/pn532.min.js"></script>
<!-- PN532.js Hf14a plugin -->
<script src="https://cdn.jsdelivr.net/gh/taichunmin/pn532.js@gh-pages/plugin/Hf14a.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pn532.js@0/dist/plugin/Hf14a.min.js"></script>
<!-- PN532.js LoggerRxTx plugin -->
<script src="https://cdn.jsdelivr.net/gh/taichunmin/pn532.js@gh-pages/plugin/LoggerRxTx.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pn532.js@0/dist/plugin/LoggerRxTx.min.js"></script>
<!-- PN532.js WebbleAdapter plugin -->
<script src="https://cdn.jsdelivr.net/gh/taichunmin/pn532.js@gh-pages/plugin/WebbleAdapter.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pn532.js@0/dist/plugin/WebbleAdapter.min.js"></script>
<!-- PN532.js WebserialAdapter plugin -->
<script src="https://cdn.jsdelivr.net/gh/taichunmin/pn532.js@gh-pages/plugin/WebserialAdapter.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pn532.js@0/dist/plugin/WebserialAdapter.min.js"></script>
```

## Getting Started
Expand Down
43 changes: 36 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{
"name": "pn532.js",
"version": "0.1.0",
"version": "0.1.1",
"author": "taichunmin <[email protected]>",
"browser": "dist/pn532.min.js",
"description": "pn532.js is a JavaScript library for PN532 base on Web Bluetooth and Web Serial.",
"homepage": "https://taichunmin.idv.tw/pn532.js/docs/",
"jsdelivr": "dist/pn532.min.js",
"license": "MIT",
"main": "src/main.js",
"repository": "[email protected]:taichunmin/pn532.js.git",
"type": "module",
"unpkg": "dist/pn532.min.js",
"bugs": {
"url": "https://github.com/taichunmin/pn532.js/issues"
},
"contributors": [
{
"email": "[email protected]",
"name": "Chunmin Tai",
"url": "https://taichunmin.idv.tw"
}
],
"dependencies": {
"lodash": "^4.17.21",
"web-serial-polyfill": "^1.0.14"
Expand All @@ -19,13 +32,13 @@
"dayjs": "^1.11.5",
"documentation": "^14.0.0",
"dotenv": "^16.0.3",
"eslint": "^8.25.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.0",
"eslint-plugin-pug": "^1.2.4",
"eslint": "^8.25.0",
"fast-glob": "^3.2.12",
"finalhandler": "^1.2.0",
"html-minifier": "^4.0.0",
Expand All @@ -34,11 +47,30 @@
"livereload": "^0.9.3",
"node-watch": "^0.7.3",
"pug": "^3.0.2",
"rollup-plugin-terser": "^7.0.2",
"rollup": "^3.2.3",
"rollup-plugin-terser": "^7.0.2",
"serve-static": "^1.15.0",
"web-streams-polyfill": "^3.2.1"
},
"keywords": [
"13.56MHz",
"browser",
"chrome",
"libnfc",
"mifare classic",
"NFC",
"PN532",
"RFID",
"web bluetooth",
"web serial"
],
"repository": {
"type": "git",
"url": "https://github.com/taichunmin/pn532.js.git"
},
"resolutions": {
"**/jstransformer-scss": "taichunmin/jstransformer-scss"
},
"scripts": {
"build": "cross-env DEBUG=app:* node ./index.js && yarn docjs",
"dev": "cross-env DEBUG=app:* node ./dev.js",
Expand All @@ -47,8 +79,5 @@
"mkcert": "mkcert -key-file ./mkcert/key.pem -cert-file ./mkcert/cert.pem -ecdsa localhost",
"repl": "node --experimental-repl-await repl.js",
"test": "node --experimental-vm-modules --no-warnings node_modules/jest/bin/jest.js"
},
"resolutions": {
"**/jstransformer-scss": "taichunmin/jstransformer-scss"
}
}

0 comments on commit 94486a9

Please sign in to comment.