Skip to content

Commit

Permalink
Set the compiled file in dist as the main file
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
trygveaa committed Mar 20, 2020
1 parent 405e3bf commit 2791013
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://github.com/mapbox/mapbox-gl-draw",
"author": "mapbox",
"license": "ISC",
"main": "index.js",
"main": "dist/mapbox-gl-draw.js",
"style": "dist/mapbox-gl-draw.css",
"browserify": {
"transform": [
Expand Down
2 changes: 1 addition & 1 deletion test/api.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import test from 'tape';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import * as Constants from '../src/constants';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import createMap from './utils/create_map';
import getGeoJSON from './utils/get_geojson';
import setupAfterNextRender from './utils/after_next_render';
Expand Down
2 changes: 1 addition & 1 deletion test/direct_select.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint no-shadow:[0] */
import turfCentroid from '@turf/centroid';
import test from 'tape';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import click from './utils/mouse_click';
import tap from './utils/touch_tap';
import getGeoJSON from './utils/get_geojson';
Expand Down
2 changes: 1 addition & 1 deletion test/draw_line_string.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'tape';
import xtend from 'xtend';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import mouseClick from './utils/mouse_click';
import touchTap from './utils/touch_tap';
import createMap from './utils/create_map';
Expand Down
2 changes: 1 addition & 1 deletion test/draw_point.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'tape';
import xtend from 'xtend';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import mouseClick from './utils/mouse_click';
import touchTap from './utils/touch_tap';
import createMap from './utils/create_map';
Expand Down
2 changes: 1 addition & 1 deletion test/draw_polygon.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import test from 'tape';
import xtend from 'xtend';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import createMap from './utils/create_map';
import mouseClick from './utils/mouse_click';
import touchTap from './utils/touch_tap';
Expand Down
2 changes: 1 addition & 1 deletion test/interaction_events.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import test from 'tape';
import xtend from 'xtend';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import MapboxDraw from '../';
import MapboxDraw from '../index';
import click from './utils/mouse_click';
import createMap from './utils/create_map';
import createAfterNextRender from './utils/after_next_render';
Expand Down
2 changes: 1 addition & 1 deletion test/line_string.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import test from 'tape';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import Feature from '../src/feature_types/feature';
import LineString from '../src/feature_types/line_string';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import createFeature from './utils/create_feature';
import getPublicMemberKeys from './utils/get_public_member_keys';
import createMockCtx from './utils/create_mock_feature_context';
Expand Down
2 changes: 1 addition & 1 deletion test/options.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint no-shadow:[0] */
import test from 'tape';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import modes from '../src/modes/index';
import styleWithSourcesFixture from './fixtures/style_with_sources.json';

Expand Down
2 changes: 1 addition & 1 deletion test/point.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import test from 'tape';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import Feature from '../src/feature_types/feature';
import Point from '../src/feature_types/point';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import createFeature from './utils/create_feature';
import getPublicMemberKeys from './utils/get_public_member_keys';
import createMockCtx from './utils/create_mock_feature_context';
Expand Down
2 changes: 1 addition & 1 deletion test/polygon.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import test from 'tape';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import Feature from '../src/feature_types/feature';
import Polygon from '../src/feature_types/polygon';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import createFeature from './utils/create_feature';
import getPublicMemberKeys from './utils/get_public_member_keys';
import createMockCtx from './utils/create_mock_feature_context';
Expand Down
2 changes: 1 addition & 1 deletion test/simple_select.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint no-shadow:[0] */
import test from 'tape';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import setupAfterNextRender from './utils/after_next_render';
import makeMouseEvent from './utils/make_mouse_event';
Expand Down
2 changes: 1 addition & 1 deletion test/static.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint no-shadow:[0] */
import test from 'tape';
import MapboxDraw from '../';
import MapboxDraw from '../index';
import spy from 'sinon/lib/sinon/spy'; // avoid babel-register-related error by importing only spy
import setupAfterNextRender from './utils/after_next_render';
import makeMouseEvent from './utils/make_mouse_event';
Expand Down

0 comments on commit 2791013

Please sign in to comment.