From 24946b29faf2349ef2d8ed7c4fd844c777676926 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Tue, 17 Feb 2015 16:56:16 -0500 Subject: [PATCH] use node-pre-gyp binary in npm install --- Makefile | 2 +- README.md | 15 +++++++++++---- package.json | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f680ec803..8f79ab04a 100644 --- a/Makefile +++ b/Makefile @@ -61,5 +61,5 @@ test: test-js test-suite .PHONY: clean clean: - rm -rf build + rm -rf build lib rm -f $(MBGL)/config/$(HOST).gypi diff --git a/README.md b/README.md index 1b274f946..738a30930 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,20 @@ Renders map tiles with [Mapbox GL](https://github.com/mapbox/mapbox-gl-native). [![Build Status](https://api.travis-ci.com/mapbox/node-mapbox-gl-native.svg?token=Phdq58g7NsfstW6gyeYW)](https://magnum.travis-ci.com/mapbox/node-mapbox-gl-native) -## Loading the module +## Installing -To compile this module, make sure all submodules are initialized +By default, installs binaries. On these platforms no external dependencies are needed. + +- 64 bit OS X or 64 bit Linux +- Node v0.10.x + +Just run: -```js -var mbgl = require('mbgl'); ``` +npm install mbgl +``` + +However, other platforms will fall back to a source compile with `make build`. To compile this module, make sure all submodules are initialized. ## Rendering a map tile diff --git a/package.json b/package.json index 46b54b191..5bf9725ce 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "tape": "^3.5.0" }, "scripts": { - "install": "make", + "install": "node-pre-gyp install || make", "test": "make test" }, "gypfile": true,