From 1e012d70163bf965b455283ff3666e35283d735e Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Tue, 22 Aug 2017 16:01:27 +0300 Subject: [PATCH] more deps cleanup --- .gitignore | 1 + decode.js | 5 +++-- package.json | 14 ++++++-------- test/validate.test.js | 6 ++++-- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 1071426..81cf5fa 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ coverage *.log node_modules debug +.nyc_output diff --git a/decode.js b/decode.js index 31927c1..662a72c 100644 --- a/decode.js +++ b/decode.js @@ -4,8 +4,9 @@ module.exports = decode; var keys, values, lengths, dim, e; -var geometryTypes = ['Point', 'MultiPoint', 'LineString', 'MultiLineString', - 'Polygon', 'MultiPolygon', 'GeometryCollection']; +var geometryTypes = [ + 'Point', 'MultiPoint', 'LineString', 'MultiLineString', + 'Polygon', 'MultiPolygon', 'GeometryCollection']; function decode(pbf) { dim = 2; diff --git a/package.json b/package.json index 1d1c5f1..e97180e 100644 --- a/package.json +++ b/package.json @@ -9,13 +9,13 @@ "shp2geobuf": "bin/shp2geobuf" }, "scripts": { - "test": "eslint *.js test/*.js && tap test/*.js", - "cov": "istanbul cover test/*.js", - "coveralls": "istanbul cover test/*.js && coveralls < ./coverage/lcov.info", + "pretest": "eslint *.js test/*.js", + "test": "tap test/*.js", + "cov": "tap --cov test/*.js", "build-min": "mkdirp dist && browserify index.js -s geobuf | uglifyjs -c warnings=false -m > dist/geobuf.js", "build-dev": "mkdirp dist && browserify index.js -d -s geobuf > dist/geobuf-dev.js", - "build": "npm run build-min && npm run build-dev", - "prepublish": "in-publish && npm run build || not-in-publish" + "build-all": "npm run build-min && npm run build-dev", + "prepublish": "in-publish && npm run build-all || not-in-publish" }, "repository": { "type": "git", @@ -39,15 +39,13 @@ "devDependencies": { "benchmark": "~2.1.4", "browserify": "^14.4.0", - "coveralls": "~2.13.1", "eslint": "^4.5.0", "eslint-config-mourner": "^2.0.1", "geojson-fixtures": "1.0.0", "in-publish": "^2.0.0", - "istanbul": "~0.4.5", "mkdirp": "^0.5.1", "tap": "~10.7.2", - "uglifyjs": "^2.4.11" + "uglify-js": "^3.0.28" }, "dependencies": { "concat-stream": "^1.6.0", diff --git a/test/validate.test.js b/test/validate.test.js index e1247b1..9f45b1d 100644 --- a/test/validate.test.js +++ b/test/validate.test.js @@ -60,8 +60,10 @@ test('roundtrip a circle with potential accumulating error', function (t) { }; var points = 16; for (var i = 0; i <= points; i++) { - feature.coordinates[0][0].push([Math.cos(Math.PI * 2.0 * i / points), - Math.sin(Math.PI * 2.0 * i / points)]); + feature.coordinates[0][0].push([ + Math.cos(Math.PI * 2.0 * i / points), + Math.sin(Math.PI * 2.0 * i / points) + ]); } var roundTripped = geobuf.decode(new Pbf(geobuf.encode(feature, new Pbf()))); function roundCoord(z) {