Skip to content

Commit 41a835d

Browse files
authored
Merge pull request #992 from chearon/prebuild
Add prebuilds
2 parents 06fbaf9 + ddd761e commit 41a835d

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
@@ -28,10 +28,14 @@ Alpha versions of 2.0 can be installed using `npm install canvas@next`.
2828
$ npm install canvas
2929
```
3030

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

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

35+
### Compiling
36+
37+
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).
38+
3539
You can quickly install the dependencies by using the command for your OS:
3640

3741
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.9",
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/node-gfx/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)