File tree Expand file tree Collapse file tree 15 files changed +299
-24
lines changed Expand file tree Collapse file tree 15 files changed +299
-24
lines changed Original file line number Diff line number Diff line change 5
5
"homepage" : " https://github.com/mapbox/mapbox-gl-draw" ,
6
6
"author" : " mapbox" ,
7
7
"license" : " ISC" ,
8
- "main" : " index .js" ,
8
+ "main" : " dist/mapbox-gl-draw .js" ,
9
9
"browser" : " dist/mapbox-gl-draw.js" ,
10
10
"style" : " dist/mapbox-gl-draw.css" ,
11
11
"browserify" : {
77
77
"opener" : " ^1.4.1" ,
78
78
"rollup" : " ^1.27.13" ,
79
79
"rollup-plugin-commonjs" : " ^10.1.0" ,
80
+ "rollup-plugin-node-builtins" : " ^2.1.2" ,
80
81
"rollup-plugin-terser" : " ^5.1.3" ,
81
82
"sinon" : " ^7.5.0" ,
82
83
"st" : " ^2.0.0" ,
86
87
"unassertify" : " ^2.0.3"
87
88
},
88
89
"peerDependencies" : {
89
- "mapbox-gl" : " >=0.27.0 <2.0.0 "
90
+ "mapbox-gl" : " >=0.27.0"
90
91
},
91
92
"dependencies" : {
92
93
"@mapbox/geojson-area" : " ^0.2.1" ,
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import buble from '@rollup/plugin-buble';
7
7
import { terser } from 'rollup-plugin-terser' ;
8
8
import resolve from '@rollup/plugin-node-resolve' ;
9
9
import commonjs from 'rollup-plugin-commonjs' ;
10
+ import builtins from 'rollup-plugin-node-builtins' ;
10
11
11
12
export default {
12
13
input : [ 'index.js' ] ,
@@ -18,12 +19,6 @@ export default {
18
19
indent : false
19
20
} ,
20
21
treeshake : true ,
21
- external : [
22
- // geojsonlint-lines has a main function that requires the path and fs module.
23
- // We never call it.
24
- 'fs' ,
25
- 'path'
26
- ] ,
27
22
plugins : [
28
23
replace ( {
29
24
'process.env.NODE_ENV' : "'browser'"
@@ -32,8 +27,9 @@ export default {
32
27
minified ? terser ( ) : false ,
33
28
resolve ( {
34
29
browser : true ,
35
- preferBuiltins : false
30
+ preferBuiltins : true
36
31
} ) ,
32
+ builtins ( ) ,
37
33
commonjs ( {
38
34
// global keyword handling causes Webpack compatibility issues, so we disabled it:
39
35
// https://github.com/mapbox/mapbox-gl-js/pull/6956
Original file line number Diff line number Diff line change 2
2
import test from 'tape' ;
3
3
import spy from 'sinon/lib/sinon/spy' ; // avoid babel-register-related error by importing only spy
4
4
import * as Constants from '../src/constants' ;
5
- import MapboxDraw from '../' ;
5
+ import MapboxDraw from '../index ' ;
6
6
import createMap from './utils/create_map' ;
7
7
import getGeoJSON from './utils/get_geojson' ;
8
8
import setupAfterNextRender from './utils/after_next_render' ;
Original file line number Diff line number Diff line change 1
1
/* eslint no-shadow:[0] */
2
2
import turfCentroid from '@turf/centroid' ;
3
3
import test from 'tape' ;
4
- import MapboxDraw from '../' ;
4
+ import MapboxDraw from '../index ' ;
5
5
import click from './utils/mouse_click' ;
6
6
import tap from './utils/touch_tap' ;
7
7
import getGeoJSON from './utils/get_geojson' ;
Original file line number Diff line number Diff line change 1
1
import test from 'tape' ;
2
2
import xtend from 'xtend' ;
3
- import MapboxDraw from '../' ;
3
+ import MapboxDraw from '../index ' ;
4
4
import mouseClick from './utils/mouse_click' ;
5
5
import touchTap from './utils/touch_tap' ;
6
6
import createMap from './utils/create_map' ;
Original file line number Diff line number Diff line change 1
1
import test from 'tape' ;
2
2
import xtend from 'xtend' ;
3
- import MapboxDraw from '../' ;
3
+ import MapboxDraw from '../index ' ;
4
4
import mouseClick from './utils/mouse_click' ;
5
5
import touchTap from './utils/touch_tap' ;
6
6
import createMap from './utils/create_map' ;
Original file line number Diff line number Diff line change 1
1
import test from 'tape' ;
2
2
import xtend from 'xtend' ;
3
- import MapboxDraw from '../' ;
3
+ import MapboxDraw from '../index ' ;
4
4
import createMap from './utils/create_map' ;
5
5
import mouseClick from './utils/mouse_click' ;
6
6
import touchTap from './utils/touch_tap' ;
Original file line number Diff line number Diff line change 3
3
import test from 'tape' ;
4
4
import xtend from 'xtend' ;
5
5
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 ' ;
7
7
import click from './utils/mouse_click' ;
8
8
import createMap from './utils/create_map' ;
9
9
import createAfterNextRender from './utils/after_next_render' ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import test from 'tape';
2
2
import spy from 'sinon/lib/sinon/spy' ; // avoid babel-register-related error by importing only spy
3
3
import Feature from '../src/feature_types/feature' ;
4
4
import LineString from '../src/feature_types/line_string' ;
5
- import MapboxDraw from '../' ;
5
+ import MapboxDraw from '../index ' ;
6
6
import createFeature from './utils/create_feature' ;
7
7
import getPublicMemberKeys from './utils/get_public_member_keys' ;
8
8
import createMockCtx from './utils/create_mock_feature_context' ;
Original file line number Diff line number Diff line change 1
1
/* eslint no-shadow:[0] */
2
2
import test from 'tape' ;
3
- import MapboxDraw from '../' ;
3
+ import MapboxDraw from '../index ' ;
4
4
import modes from '../src/modes/index' ;
5
5
import styleWithSourcesFixture from './fixtures/style_with_sources.json' ;
6
6
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import test from 'tape';
2
2
import spy from 'sinon/lib/sinon/spy' ; // avoid babel-register-related error by importing only spy
3
3
import Feature from '../src/feature_types/feature' ;
4
4
import Point from '../src/feature_types/point' ;
5
- import MapboxDraw from '../' ;
5
+ import MapboxDraw from '../index ' ;
6
6
import createFeature from './utils/create_feature' ;
7
7
import getPublicMemberKeys from './utils/get_public_member_keys' ;
8
8
import createMockCtx from './utils/create_mock_feature_context' ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import test from 'tape';
2
2
import spy from 'sinon/lib/sinon/spy' ; // avoid babel-register-related error by importing only spy
3
3
import Feature from '../src/feature_types/feature' ;
4
4
import Polygon from '../src/feature_types/polygon' ;
5
- import MapboxDraw from '../' ;
5
+ import MapboxDraw from '../index ' ;
6
6
import createFeature from './utils/create_feature' ;
7
7
import getPublicMemberKeys from './utils/get_public_member_keys' ;
8
8
import createMockCtx from './utils/create_mock_feature_context' ;
Original file line number Diff line number Diff line change 1
1
/* eslint no-shadow:[0] */
2
2
import test from 'tape' ;
3
- import MapboxDraw from '../' ;
3
+ import MapboxDraw from '../index ' ;
4
4
import spy from 'sinon/lib/sinon/spy' ; // avoid babel-register-related error by importing only spy
5
5
import setupAfterNextRender from './utils/after_next_render' ;
6
6
import makeMouseEvent from './utils/make_mouse_event' ;
Original file line number Diff line number Diff line change 1
1
/* eslint no-shadow:[0] */
2
2
import test from 'tape' ;
3
- import MapboxDraw from '../' ;
3
+ import MapboxDraw from '../index ' ;
4
4
import spy from 'sinon/lib/sinon/spy' ; // avoid babel-register-related error by importing only spy
5
5
import setupAfterNextRender from './utils/after_next_render' ;
6
6
import makeMouseEvent from './utils/make_mouse_event' ;
You can’t perform that action at this time.
0 commit comments