add node-pre-gyp
This commit is contained in:
4
Makefile
4
Makefile
@@ -30,14 +30,14 @@ global: build
|
||||
|
||||
.PHONY: build
|
||||
build: build/Makefile
|
||||
@node-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
||||
@node-pre-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
|
||||
|
||||
vendor/mbgl:
|
||||
git submodule update --init
|
||||
|
||||
.PHONY: build/Makefile
|
||||
build/Makefile: $(MBGL)/config/$(HOST).gypi
|
||||
@node-gyp configure --clang -- \
|
||||
@node-pre-gyp configure --clang -- \
|
||||
-Dmbgl=$(MBGL) \
|
||||
-Dhost=$(HOST) \
|
||||
-I$(MBGL)/config/$(HOST).gypi \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
'targets': [
|
||||
{ 'target_name': 'mbgl',
|
||||
{ 'target_name': '<(module_name)',
|
||||
'dependencies': [
|
||||
'./<(mbgl)/mbgl.gyp:core',
|
||||
'./<(mbgl)/mbgl.gyp:platform-<(platform_lib)',
|
||||
@@ -52,11 +52,11 @@
|
||||
|
||||
{ 'target_name': 'action_after_build',
|
||||
'type': 'none',
|
||||
'dependencies': [ 'mbgl' ],
|
||||
'dependencies': [ '<(module_name)' ],
|
||||
'copies': [
|
||||
{
|
||||
'files': [ '<(PRODUCT_DIR)/mbgl.node' ],
|
||||
'destination': 'lib'
|
||||
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
|
||||
'destination': '<(module_path)'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
15
package.json
15
package.json
@@ -18,8 +18,12 @@
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"nan": "^1.4.1"
|
||||
"nan": "^1.4.1",
|
||||
"node-pre-gyp": "^0.6.4"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
"node-pre-gyp"
|
||||
],
|
||||
"devDependencies": {
|
||||
"aws-sdk": "^2.1.9",
|
||||
"mapbox-gl-test-suite": "git://github.com/mapbox/mapbox-gl-test-suite#master",
|
||||
@@ -31,5 +35,12 @@
|
||||
"install": "make",
|
||||
"test": "make test"
|
||||
},
|
||||
"gypfile": true
|
||||
"gypfile": true,
|
||||
"binary": {
|
||||
"module_name": "mbgl",
|
||||
"module_path": "./lib/",
|
||||
"host": "https://mapbox-node-binary.s3.amazonaws.com",
|
||||
"remote_path": "./{name}/v{version}",
|
||||
"package_name": "{node_abi}-{platform}-{arch}.tar.gz"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user