Skip to content

Commit

Permalink
Update README & add automated build check
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwuts committed Mar 29, 2023
1 parent 35d58e8 commit 4b97cee
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Checks

on:
push:
paths:
- 'src/**'
- 'tsconfig.json'
- 'package.json'
- 'yarn.lock'
pull_request:

jobs:
build:
name: Build test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.sha}}
- uses: actions/setup-node@v3
with:
node-version: 16
- run: yarn install --frozen-lockfile
- run: yarn build
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# MCH2022 WebUSB API library
![latest NPM release](https://img.shields.io/npm/v/@badge.team/badge-webusb?style=flat-square)
![bundle size](https://img.shields.io/bundlephobia/min/@badge.team/badge-webusb?style=flat-square)
![license](https://img.shields.io/github/license/badgeteam/mch2022-webusb-lib?style=flat-square)

This library allows easy WebUSB communication with the MCH2022 badge, and possibly
more badges in the future.

## Endpoints
```TS
Expand Down Expand Up @@ -40,3 +46,13 @@ interface BadgeAPI {
}
```
TODO: auto generated docs :)

## Credits
* Renze Nicolai (@renzenicolai): WebUSB implementation (firmware + JS client)
* Reinier van der Leer (@Pwuts): TypeScript conversion & documentation

## References
* [WebUSB implementation] in the MCH2022 badge firmware
* [MDN WebUSB API spec](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API)

[WebUSB implementation]: https://github.com/badgeteam/mch2022-firmware-esp32/blob/master/main/webusb.c

0 comments on commit 4b97cee

Please sign in to comment.