diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | platform/node/.clang-format | 18 | ||||
-rw-r--r-- | platform/node/.gitignore | 5 | ||||
-rw-r--r-- | platform/node/CONTRIBUTING.md | 1 | ||||
-rw-r--r-- | platform/node/LICENSE.txt | 27 | ||||
-rw-r--r-- | platform/node/Makefile | 78 | ||||
-rwxr-xr-x | platform/node/examples/load-from-fs.js | 7 |
7 files changed, 7 insertions, 132 deletions
diff --git a/.gitignore b/.gitignore index 4ee833bcf7..123bf8cba9 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,6 @@ /ios/benchmark/assets/tiles/mapbox.mapbox-streets-v6/ /ios/benchmark/assets/tiles/mapbox.mapbox-terrain-v2/ /ios/benchmark/assets/glyphs/DIN Offc Pro*/ + +/platform/node/test/actual +/platform/node/test/diff diff --git a/platform/node/.clang-format b/platform/node/.clang-format deleted file mode 100644 index 109b562b59..0000000000 --- a/platform/node/.clang-format +++ /dev/null @@ -1,18 +0,0 @@ -Standard: Cpp11 -IndentWidth: 4 -AccessModifierOffset: -4 -UseTab: Never -BinPackParameters: true -AllowShortIfStatementsOnASingleLine: false -AllowShortLoopsOnASingleLine: false -AllowShortBlocksOnASingleLine: false -AllowShortFunctionsOnASingleLine: false -ConstructorInitializerAllOnOneLineOrOnePerLine: true -AlwaysBreakTemplateDeclarations: true -NamespaceIndentation: None -PointerBindsToType: false -SpacesInParentheses: false -BreakBeforeBraces: Attach -ColumnLimit: 100 -Cpp11BracedListStyle: false -SpacesBeforeTrailingComments: 1 diff --git a/platform/node/.gitignore b/platform/node/.gitignore deleted file mode 100644 index 2f53e5d179..0000000000 --- a/platform/node/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -build -lib -node_modules -test/actual -test/diff diff --git a/platform/node/CONTRIBUTING.md b/platform/node/CONTRIBUTING.md deleted file mode 100644 index 166929e33f..0000000000 --- a/platform/node/CONTRIBUTING.md +++ /dev/null @@ -1 +0,0 @@ -Please run [`clang-format`](http://clang.llvm.org/docs/ClangFormat.html) and verify that code formatting will remain consistent before submitting a pull request. diff --git a/platform/node/LICENSE.txt b/platform/node/LICENSE.txt deleted file mode 100644 index c9018a1390..0000000000 --- a/platform/node/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2014, Mapbox -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of [project] nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/platform/node/Makefile b/platform/node/Makefile deleted file mode 100644 index b17f66e26e..0000000000 --- a/platform/node/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -BUILDTYPE ?= Release -MBGL ?= vendor/mbgl - -DEBUG_FLAG = -ifeq ($(BUILDTYPE), Debug) -DEBUG_FLAG = -d -endif - -ifeq ($(shell uname -s), Darwin) -HOST ?= osx -ifeq ($(JOBS),) -JOBS = $(shell sysctl -n hw.ncpu) -endif -endif -ifeq ($(shell uname -s), Linux) -HOST ?= linux -ifeq ($(JOBS),) -JOBS = $(shell nproc) -endif -endif - -NODE_PRE_GYP = $(shell which node-pre-gyp) -ifeq ($(NODE_PRE_GYP),) -NODE_PRE_GYP = $(shell npm bin)/node-pre-gyp -endif - -# Explicitly disable the default FileSource implementation -ASSET = none -HTTP = none -CACHE = none - -include $(MBGL)/config/defaults.mk - -global: build - -.PHONY: build -build: build/Makefile - @$(NODE_PRE_GYP) build $(DEBUG_FLAG) --clang -- -j$(JOBS) - -vendor/mbgl: - git submodule update --init - -GYP_SETTINGS = -Dmbgl=$(MBGL) \ - -Dhost=$(HOST) \ - -I$(MBGL)/config/$(HOST).gypi \ - $(LIBS_$(HOST)) \ - -Duv_static_libs= -Duv_ldflags= - -.PHONY: build/Makefile -build/Makefile: $(MBGL)/config/$(HOST).gypi - @$(NODE_PRE_GYP) configure --clang -- $(GYP_SETTINGS) -f make - -.PHONY: build/binding.xcodeproj -build/binding.xcodeproj: $(MBGL)/config/$(HOST).gypi - @$(NODE_PRE_GYP) configure --clang -- $(GYP_SETTINGS) -f xcode - -.PHONY: xproj -xproj: build/binding.xcodeproj - open build/binding.xcodeproj - -$(MBGL)/config/%.gypi: $(MBGL) $(MBGL)/configure - make -C $(MBGL) config/$*.gypi geojsonvt - -.PHONY: test-suite -test-suite: - -@(`npm bin`/tape test/render.test.js) - -.PHONY: test-js -test-js: - @(`npm bin`/tape test/js/**/*.test.js) - -.PHONY: test -test: test-js test-suite - -.PHONY: clean -clean: - rm -rf build lib - rm -f $(MBGL)/config/$(HOST).gypi diff --git a/platform/node/examples/load-from-fs.js b/platform/node/examples/load-from-fs.js index 352b015573..f8c072d4b5 100755 --- a/platform/node/examples/load-from-fs.js +++ b/platform/node/examples/load-from-fs.js @@ -2,19 +2,20 @@ /* jshint node: true, unused: false */ 'use strict'; -var mbgl = require('..'); +var mbgl = require('../../..'); var fs = require('fs'); var path = require('path'); var PNG = require('pngjs').PNG; -var base = path.join(path.dirname(process.mainModule.filename), '../test'); +var base = path.join(__dirname, '../test'); var map = new mbgl.Map({ request: function(req) { fs.readFile(path.join(base, req.url), function(err, data) { req.respond(err, { data: data }); }); - } + }, + ratio: 1.0 }); map.load(require('../test/fixtures/style.json')); |