Skip to content

Commit 7672ac7

Browse files
committed
fix: issues with consumers not being able to use canvas as a peer dependency, make it a regular dependency; remove unused events dependency, #40
1 parent d652cfd commit 7672ac7

File tree

5 files changed

+843
-409
lines changed

5 files changed

+843
-409
lines changed

.github/workflows/nodejs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
- name: Install system dependencies
2424
run: sudo apt-get install libcairo2-dev libpango1.0-dev libgif-dev
2525
- run: npm ci
26-
- run: npm install canvas --no-save
2726
- run: npm test
2827
env:
2928
CI: true

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,7 @@ Installation
4343
npm install loupedeck
4444
```
4545

46-
By default, `loupedeck` uses RGB565 (16-bit) buffers for drawing (with small exceptions, see below). To enable a more pleasant API that allows for drawing using [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) callbacks, also install `canvas`:
47-
48-
```shell
49-
npm install canvas
50-
```
46+
By default, Loupdeck devices uses RGB565 (16-bit) buffers for drawing (with small exceptions, see below), so the [`canvas` module](https://www.npmjs.com/package/canvas) is used to enable a more pleasant API that allows for drawing using [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API) callbacks.
5147

5248
Usage Examples
5349
--------------
@@ -235,7 +231,7 @@ Returns a Promise which resolves once the command has been acknowledged by the d
235231

236232
#### `device.drawCanvas({ id : String, width : Number, height : Number, x? : Number, y? : Number, autoRefresh? : Boolean }, callback : Function) : Promise`
237233

238-
Draw graphics to a particular area using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D). Requires [`canvas`](https://www.npmjs.com/package/canvas) to be installed.
234+
Draw graphics to a particular area using the [Canvas API](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D).
239235

240236
Lower-level method if [`drawKey()`](#devicedrawkeykey--number-buffercallback--bufferfunction--promise) or [`drawScreen()`](#devicedrawscreenscreenid--string-buffercallback--bufferfunction--promise) don't meet your needs.
241237

0 commit comments

Comments
 (0)