Skip to content

Commit 73dbaf4

Browse files
delucischearon
authored andcommitted
docs(README): Document using canvas-prebuilt@2.x (#61)
* docs(README): Document using canvas-prebuilt@2.x * docs(README): Make package deprecation clearer
1 parent 349606d commit 73dbaf4

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

README.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
1-
[![NPM version](https://badge.fury.io/js/canvas-prebuilt.svg)](http://badge.fury.io/js/canvas-prebuilt)
2-
3-
This is a drop-in replacement for canvas that does not require any compiling. To use it
4-
just `npm install canvas-prebuilt` or replace `canvas` with `canvas-prebuilt` in your
5-
dependencies.
1+
**NOTE:** the `canvas-prebuilt` package is deprecated. As of version 2,
2+
[`canvas`](https://github.com/Automattic/node-canvas) itself bundles prebuilt
3+
versions from this repo. Install by running
4+
```
5+
npm install --save canvas
6+
```
7+
…and use `canvas` as usual.
8+
9+
# Using `canvas-prebuilt` (deprecated)
10+
11+
This is a drop-in replacement for `canvas` that does not require any compiling.
12+
The repo is just a set of scripts that downloads a specific `node-canvas` version, builds it
13+
and bundles it on all platforms. It's meant to run on Travis and AppVeyor but it can
14+
be run locally too.
615

7-
You will also need to change `require('canvas')` to `require('canvas-prebuilt')`.
16+
If you still need to use prebuilt 1.x and 2-alpha versions of `canvas`,
17+
run `npm install --save canvas-prebuilt`
18+
or replace `canvas` with `canvas-prebuilt` in your dependencies.
819

9-
The repo is just a set of scripts that downloads a specific node-canvas version, builds it
10-
and bundles it on all platforms. It's meant to run on Travis and AppVeyor but it can
11-
be run locally too
20+
In your code, use `require('canvas-prebuilt')` wherever you would otherwise use `require('canvas')`.
1221

1322
# Linux technicalities
1423

0 commit comments

Comments
 (0)