Skip to content

Commit 1ec2d1d

Browse files
committed
node-pre-gyp install script for canvas-prebuilt
1 parent bc1a1f1 commit 1ec2d1d

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
language: node_js
2+
install:
3+
- npm install --build-from-source
24
node_js:
35
- '8'
46
- '6'

Readme.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@
2727
$ npm install canvas
2828
```
2929

30-
Unless previously installed you'll _need_ __Cairo__ and __Pango__. For system-specific installation view the [Wiki](https://github.com/Automattic/node-canvas/wiki/_pages).
30+
By default, binaries for macOS, Linux and Windows will be downloaded. If you want to build from source, use `npm install --build-from-source`.
3131

3232
Currently the minimum version of node required is __4.0.0__
3333

34+
### Compiling
35+
36+
If you don't have a supported OS or processor architecture, or you use `--build-from-source`, the module will be compiled on your system. Unless previously installed you'll _need_ __Cairo__ and __Pango__. For system-specific installation view the [Wiki](https://github.com/Automattic/node-canvas/wiki/_pages).
37+
3438
You can quickly install the dependencies by using the command for your OS:
3539

3640
OS | Command

package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"description": "Canvas graphics API backed by Cairo",
44
"version": "2.0.0-alpha.5",
55
"author": "TJ Holowaychuk <[email protected]>",
6+
"main": "index.js",
67
"browser": "browser.js",
78
"contributors": [
89
"Nathan Rajlich <[email protected]>",
@@ -27,9 +28,17 @@
2728
"pretest": "node-gyp build",
2829
"test": "standard examples/*.js test/server.js test/public/*.js benchmark/run.js util/has_lib.js browser.js index.js && mocha test/*.test.js",
2930
"pretest-server": "node-gyp build",
30-
"test-server": "node test/server.js"
31+
"test-server": "node test/server.js",
32+
"install": "node-pre-gyp install"
33+
},
34+
"binary": {
35+
"module_name": "canvas-prebuilt",
36+
"module_path": "build/Release",
37+
"host": "https://github.com/chearon/node-canvas-prebuilt/releases/download/",
38+
"remote_path": "v{version}"
3139
},
3240
"dependencies": {
41+
"node-pre-gyp": "^0.6.36",
3342
"nan": "^2.4.0"
3443
},
3544
"devDependencies": {

0 commit comments

Comments
 (0)