Skip to content

Commit

Permalink
Added .js extension to import statments with relative paths (mapbox#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
m0ose authored and mourner committed Sep 27, 2019
1 parent 6904f5f commit 736f8d7
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/clip.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import createFeature from './feature';
import createFeature from './feature.js';

/* clip features between two vertical or horizontal axis-parallel lines:
* | |
Expand Down
4 changes: 2 additions & 2 deletions src/convert.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import simplify from './simplify';
import createFeature from './feature';
import simplify from './simplify.js';
import createFeature from './feature.js';

// converts GeoJSON feature into an intermediate projected JSON vector format with simplification data

Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import convert from './convert'; // GeoJSON conversion and preprocessing
import clip from './clip'; // stripe clipping algorithm
import wrap from './wrap'; // date line processing
import transform from './transform'; // coordinate transformation
import createTile from './tile'; // final simplified tile generation
import convert from './convert.js'; // GeoJSON conversion and preprocessing
import clip from './clip.js'; // stripe clipping algorithm
import wrap from './wrap.js'; // date line processing
import transform from './transform.js'; // coordinate transformation
import createTile from './tile.js'; // final simplified tile generation

export default function geojsonvt(data, options) {
return new GeoJSONVT(data, options);
Expand Down
4 changes: 2 additions & 2 deletions src/wrap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import clip from './clip';
import createFeature from './feature';
import clip from './clip.js';
import createFeature from './feature.js';

export default function wrap(features, options) {
const buffer = options.buffer / options.extent;
Expand Down
2 changes: 1 addition & 1 deletion test/test-clip.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import test from 'tape';
import clip from '../src/clip';
import clip from '../src/clip.js';

/*eslint comma-spacing:0*/

Expand Down
2 changes: 1 addition & 1 deletion test/test-full.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import test from 'tape';
import fs from 'fs';
import path from 'path';
import geojsonvt from '../src/index';
import geojsonvt from '../src/index.js';

testTiles('us-states.json', 'us-states-tiles.json', {indexMaxZoom: 7, indexMaxPoints: 200});
testTiles('dateline.json', 'dateline-tiles.json', {indexMaxZoom: 0, indexMaxPoints: 10000});
Expand Down
2 changes: 1 addition & 1 deletion test/test-get-tile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import test from 'tape';
import fs from 'fs';
import path from 'path';
import geojsonvt from '../src/index';
import geojsonvt from '../src/index.js';

const square = [{
geometry: [[[-64, 4160], [-64, -64], [4160, -64], [4160, 4160], [-64, 4160]]],
Expand Down
2 changes: 1 addition & 1 deletion test/test-multi-world.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

import test from 'tape';
import geojsonvt from '../src/index';
import geojsonvt from '../src/index.js';

const leftPoint = {
type: 'Feature',
Expand Down
2 changes: 1 addition & 1 deletion test/test-simplify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import simplify from '../src/simplify';
import simplify from '../src/simplify.js';
import test from 'tape';

/*eslint comma-spacing:0, no-shadow: 0*/
Expand Down

0 comments on commit 736f8d7

Please sign in to comment.