Skip to content

Commit 2791013

Browse files
committed
Set the compiled file in dist as the main file
This lets people just import @mapbox/mapbox-gl-draw instead of having to import @mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.js. It's standard practise to set the compiled file in main, and most other packages including mapbox-gl does so.
1 parent 405e3bf commit 2791013

13 files changed

+13
-13
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://github.com/mapbox/mapbox-gl-draw",
66
"author": "mapbox",
77
"license": "ISC",
8-
"main": "index.js",
8+
"main": "dist/mapbox-gl-draw.js",
99
"style": "dist/mapbox-gl-draw.css",
1010
"browserify": {
1111
"transform": [

test/api.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import test from 'tape';
33
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
44
import * as Constants from '../src/constants';
5-
import MapboxDraw from '../';
5+
import MapboxDraw from '../index';
66
import createMap from './utils/create_map';
77
import getGeoJSON from './utils/get_geojson';
88
import setupAfterNextRender from './utils/after_next_render';

test/direct_select.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint no-shadow:[0] */
22
import turfCentroid from '@turf/centroid';
33
import test from 'tape';
4-
import MapboxDraw from '../';
4+
import MapboxDraw from '../index';
55
import click from './utils/mouse_click';
66
import tap from './utils/touch_tap';
77
import getGeoJSON from './utils/get_geojson';

test/draw_line_string.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'tape';
22
import xtend from 'xtend';
3-
import MapboxDraw from '../';
3+
import MapboxDraw from '../index';
44
import mouseClick from './utils/mouse_click';
55
import touchTap from './utils/touch_tap';
66
import createMap from './utils/create_map';

test/draw_point.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'tape';
22
import xtend from 'xtend';
3-
import MapboxDraw from '../';
3+
import MapboxDraw from '../index';
44
import mouseClick from './utils/mouse_click';
55
import touchTap from './utils/touch_tap';
66
import createMap from './utils/create_map';

test/draw_polygon.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import test from 'tape';
22
import xtend from 'xtend';
3-
import MapboxDraw from '../';
3+
import MapboxDraw from '../index';
44
import createMap from './utils/create_map';
55
import mouseClick from './utils/mouse_click';
66
import touchTap from './utils/touch_tap';

test/interaction_events.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import test from 'tape';
44
import xtend from 'xtend';
55
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
6-
import MapboxDraw from '../';
6+
import MapboxDraw from '../index';
77
import click from './utils/mouse_click';
88
import createMap from './utils/create_map';
99
import createAfterNextRender from './utils/after_next_render';

test/line_string.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import test from 'tape';
22
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
33
import Feature from '../src/feature_types/feature';
44
import LineString from '../src/feature_types/line_string';
5-
import MapboxDraw from '../';
5+
import MapboxDraw from '../index';
66
import createFeature from './utils/create_feature';
77
import getPublicMemberKeys from './utils/get_public_member_keys';
88
import createMockCtx from './utils/create_mock_feature_context';

test/options.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint no-shadow:[0] */
22
import test from 'tape';
3-
import MapboxDraw from '../';
3+
import MapboxDraw from '../index';
44
import modes from '../src/modes/index';
55
import styleWithSourcesFixture from './fixtures/style_with_sources.json';
66

test/point.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import test from 'tape';
22
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
33
import Feature from '../src/feature_types/feature';
44
import Point from '../src/feature_types/point';
5-
import MapboxDraw from '../';
5+
import MapboxDraw from '../index';
66
import createFeature from './utils/create_feature';
77
import getPublicMemberKeys from './utils/get_public_member_keys';
88
import createMockCtx from './utils/create_mock_feature_context';

test/polygon.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import test from 'tape';
22
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
33
import Feature from '../src/feature_types/feature';
44
import Polygon from '../src/feature_types/polygon';
5-
import MapboxDraw from '../';
5+
import MapboxDraw from '../index';
66
import createFeature from './utils/create_feature';
77
import getPublicMemberKeys from './utils/get_public_member_keys';
88
import createMockCtx from './utils/create_mock_feature_context';

test/simple_select.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint no-shadow:[0] */
22
import test from 'tape';
3-
import MapboxDraw from '../';
3+
import MapboxDraw from '../index';
44
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
55
import setupAfterNextRender from './utils/after_next_render';
66
import makeMouseEvent from './utils/make_mouse_event';

test/static.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint no-shadow:[0] */
22
import test from 'tape';
3-
import MapboxDraw from '../';
3+
import MapboxDraw from '../index';
44
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
55
import setupAfterNextRender from './utils/after_next_render';
66
import makeMouseEvent from './utils/make_mouse_event';

0 commit comments

Comments
 (0)