diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2015-09-01 15:51:29 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2015-09-01 15:51:29 -0400 |
commit | 0e79d56b0939de9f4722350a34ab76554a23431c (patch) | |
tree | b4fd9f7dbebfcdde7fb1445d1dc4671daa1607d7 /platform | |
parent | c4c3b5bc71c38fe6d6c0df0ddb38c57dfd2767ab (diff) | |
download | qtlocation-mapboxgl-0e79d56b0939de9f4722350a34ab76554a23431c.tar.gz |
move package.json and binding.gyp to root, drop tiles.tilejson
Diffstat (limited to 'platform')
-rw-r--r-- | platform/node/binding.gyp | 82 | ||||
-rw-r--r-- | platform/node/package.json | 48 | ||||
-rw-r--r-- | platform/node/test/fixtures/style.json | 6 | ||||
-rw-r--r-- | platform/node/test/fixtures/tiles.tilejson | 13 | ||||
-rw-r--r-- | platform/node/test/js/consecutive.test.js | 2 | ||||
-rw-r--r-- | platform/node/test/js/gzip.test.js | 9 | ||||
-rw-r--r-- | platform/node/test/js/map.test.js | 14 | ||||
-rw-r--r-- | platform/node/test/render.test.js | 2 |
8 files changed, 14 insertions, 162 deletions
diff --git a/platform/node/binding.gyp b/platform/node/binding.gyp deleted file mode 100644 index 88ad5ed599..0000000000 --- a/platform/node/binding.gyp +++ /dev/null @@ -1,82 +0,0 @@ -{ - 'includes': [ - '../../gyp/common.gypi', - ], - 'targets': [ - { 'target_name': '<(module_name)', - 'dependencies': [ - '../../mbgl.gyp:core', - '../../mbgl.gyp:platform-<(platform_lib)', - '../../mbgl.gyp:headless-<(headless_lib)', - ], - - 'include_dirs': [ "<!(node -e \"require('nan')\")" ], - - 'sources': [ - 'src/node_mapbox_gl_native.cpp', - 'src/node_log.hpp', - 'src/node_log.cpp', - 'src/node_file_source.hpp', - 'src/node_file_source.cpp', - 'src/node_map.hpp', - 'src/node_map.cpp', - 'src/node_request.hpp', - 'src/node_request.cpp', - 'src/util/async_queue.hpp', - ], - - 'conditions': [ - ['OS=="mac"', { - 'xcode_settings': { - 'CLANG_CXX_LIBRARY': 'libc++', - 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', - 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', - 'GCC_ENABLE_CPP_RTTI': 'YES', - 'OTHER_CPLUSPLUSFLAGS': [ - '-std=c++1y', - '-Werror', - '-Wall', - '-Wextra', - '-Wshadow', - '-Wno-variadic-macros', - '-Wno-error=unused-parameter', - '-frtti', - '-fexceptions', - ], - 'GCC_WARN_PEDANTIC': 'YES', - 'GCC_WARN_UNINITIALIZED_AUTOS': 'YES_AGGRESSIVE', - 'MACOSX_DEPLOYMENT_TARGET': '10.9', - }, - }, { - 'cflags_cc': [ - '-std=c++14', - '-Werror', - '-Wall', - '-Wextra', - '-Wno-variadic-macros', - '-Wno-error=unused-parameter', - '-frtti', - '-fexceptions', - ], - 'libraries': [ '<@(glfw_ldflags)' ], - }], - ['OS=="linux"', { - 'cflags_cc': [ - '-Wno-unknown-pragmas', # We are using '#pragma mark', but it is only available on Darwin. - ], - }], - ], - }, - - { 'target_name': 'action_after_build', - 'type': 'none', - 'dependencies': [ '<(module_name)' ], - 'copies': [ - { - 'files': [ '<(PRODUCT_DIR)/<(module_name).node' ], - 'destination': '<(module_path)' - } - ] - } - ] -} diff --git a/platform/node/package.json b/platform/node/package.json deleted file mode 100644 index fb8663d9ae..0000000000 --- a/platform/node/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "mapbox-gl-native", - "version": "1.1.3", - "description": "Renders map tiles with Mapbox GL", - "keywords": [ - "mapbox", - "gl" - ], - "main": "lib/mapbox-gl-native.node", - "repository": { - "type": "git", - "url": "git://github.com/mapbox/node-mapbox-gl-native.git" - }, - "licenses": [ - { - "type": "BSD", - "url": "https://github.com/mapbox/node-mapbox-gl-native/blob/master/LICENSE.txt" - } - ], - "dependencies": { - "nan": "^1.9.0", - "node-pre-gyp": "^0.6.9" - }, - "bundledDependencies": [ - "node-pre-gyp" - ], - "devDependencies": { - "aws-sdk": "^2.1.47", - "mkdirp": "^0.5.1", - "pngjs": "^0.4.0", - "request": "^2.61.0", - "st": "^0.5.5", - "tape": "^4.2.0" - }, - "scripts": { - "install": "node-pre-gyp install || make node -C ../../", - "test": "tape test/js/**/*.test.js", - "test-suite": "tape test/render.test.js" - }, - "gypfile": true, - "binary": { - "module_name": "mapbox-gl-native", - "module_path": "./lib/", - "host": "https://mapbox-node-binary.s3.amazonaws.com", - "remote_path": "./{name}/v{version}", - "package_name": "{node_abi}-{platform}-{arch}.tar.gz" - } -} diff --git a/platform/node/test/fixtures/style.json b/platform/node/test/fixtures/style.json index 55442c879d..222ac82bf8 100644 --- a/platform/node/test/fixtures/style.json +++ b/platform/node/test/fixtures/style.json @@ -4,8 +4,10 @@ "sources": { "mapbox": { "type": "vector", - "url": "./fixtures/tiles.tilejson", - "maxzoom": 15 + "maxzoom": 15, + "tiles": [ + "./fixtures/tiles/{z}-{x}-{y}.vector.pbf" + ] } }, "layers": [ diff --git a/platform/node/test/fixtures/tiles.tilejson b/platform/node/test/fixtures/tiles.tilejson deleted file mode 100644 index 320c17500e..0000000000 --- a/platform/node/test/fixtures/tiles.tilejson +++ /dev/null @@ -1,13 +0,0 @@ -{ - "bounds": [ -180, -85.0511, 180, 85.0511 ], - "center": [ 0, 0, 0 ], - "format": "pbf", - "id": "mapbox.mapbox-streets-v6-dev", - "maskLevel": 8, - "maxzoom": 15, - "minzoom": 0, - "name": "Mapbox Streets V6", - "scheme": "xyz", - "tilejson": "2.0.0", - "tiles": [ "./fixtures/tiles/{z}-{x}-{y}.vector.pbf" ] -} diff --git a/platform/node/test/js/consecutive.test.js b/platform/node/test/js/consecutive.test.js index ec4b2968bd..928ca1d837 100644 --- a/platform/node/test/js/consecutive.test.js +++ b/platform/node/test/js/consecutive.test.js @@ -3,7 +3,7 @@ /* jshint node:true */ var test = require('tape'); -var mbgl = require('../..'); +var mbgl = require('../../../..'); var fs = require('fs'); var path = require('path'); diff --git a/platform/node/test/js/gzip.test.js b/platform/node/test/js/gzip.test.js index 9e899604ae..4545a18cf5 100644 --- a/platform/node/test/js/gzip.test.js +++ b/platform/node/test/js/gzip.test.js @@ -3,24 +3,23 @@ /* jshint node: true */ var test = require('tape').test; -var mbgl = require('../..'); +var mbgl = require('../../../..'); var fs = require('fs'); var path = require('path'); var mkdirp = require('mkdirp'); var http = require('http'); var request = require('request'); var st = require('st'); -var style = require('../../test/fixtures/style.json'); +var style = require('../fixtures/style.json'); var PNG = require('pngjs').PNG; var compare = require('../compare.js'); -var dirPath = path.join(path.dirname(require.resolve('../../package.json')), 'test'); -var server = http.createServer(st({ path: dirPath })); +var server = http.createServer(st({ path: path.join(__dirname, '..') })); server.listen(0); function filePath(name) { return ['expected', 'actual', 'diff'].reduce(function(prev, key) { - var dir = path.join('test', key, 'gzip'); + var dir = path.join(__dirname, '..', key, 'gzip'); mkdirp.sync(dir); prev[key] = path.join(dir, name); return prev; diff --git a/platform/node/test/js/map.test.js b/platform/node/test/js/map.test.js index d4a8a77960..09870abaaa 100644 --- a/platform/node/test/js/map.test.js +++ b/platform/node/test/js/map.test.js @@ -3,7 +3,7 @@ /* jshint node: true */ var test = require('tape'); -var mbgl = require('../..'); +var mbgl = require('../../../..'); var fs = require('fs'); var path = require('path'); var mkdirp = require('mkdirp'); @@ -13,7 +13,7 @@ var compare = require('../compare.js'); function filePath(name) { return ['expected', 'actual', 'diff'].reduce(function(prev, key) { - var dir = path.join('test', key, 'map'); + var dir = path.join(__dirname, '..', key, 'map'); mkdirp.sync(dir); prev[key] = path.join(dir, name); return prev; @@ -145,13 +145,7 @@ test('Map', function(t) { t.test('does not immediately trigger any tile loads', function(t) { var map = new mbgl.Map({ request: function(req) { - if (req.url === './fixtures/tiles.tilejson') { - fs.readFile(path.join('test', req.url), function (err, data) { - req.respond(err, {data: data}); - }); - } else { - t.fail('unexpected request ' + req.url); - } + t.fail('unexpected request ' + req.url); }, ratio: 1 }); @@ -168,7 +162,7 @@ test('Map', function(t) { t.test('.render', function(t) { var options = { request: function(req) { - fs.readFile(path.join('test', req.url), function(err, data) { + fs.readFile(path.join(__dirname, '..', req.url), function(err, data) { req.respond(err, { data: data }); }); }, diff --git a/platform/node/test/render.test.js b/platform/node/test/render.test.js index e14f294eb2..10a7afcb52 100644 --- a/platform/node/test/render.test.js +++ b/platform/node/test/render.test.js @@ -3,7 +3,7 @@ /* jshint node:true */ var test = require('tape'); -var mbgl = require('..'); +var mbgl = require('../../..'); var fs = require('fs'); var path = require('path'); var mkdirp = require('mkdirp'); |