mirror of
https://github.com/google-map-react/google-map-react.git
synced 2025-12-08 18:26:32 +00:00
Produce CommonJS and UMD bundles (#932)
This commit is contained in:
parent
24b9c93228
commit
9e06d200b1
@ -15,8 +15,8 @@
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "microbundle-crl --no-compress --format modern,cjs",
|
||||
"start": "microbundle-crl watch --no-compress --format modern,cjs",
|
||||
"build": "microbundle-crl -f cjs,umd src/index.cjs.js && microbundle-crl -f es,modern src/index.js",
|
||||
"start": "microbundle-crl watch -f cjs,umd",
|
||||
"prepare": "run-s build",
|
||||
"test": "run-s test:unit test:lint test:build",
|
||||
"test:build": "run-s build",
|
||||
|
||||
23
src/index.cjs.js
Normal file
23
src/index.cjs.js
Normal file
@ -0,0 +1,23 @@
|
||||
import GoogleMap from './google_map';
|
||||
|
||||
import {
|
||||
convertNeSwToNwSe,
|
||||
convertNwSeToNeSw,
|
||||
fitBounds,
|
||||
meters2ScreenPixels,
|
||||
tile2LatLng,
|
||||
latLng2Tile,
|
||||
getTilesIds,
|
||||
} from './lib';
|
||||
|
||||
Object.assign(GoogleMap, {
|
||||
convertNeSwToNwSe,
|
||||
convertNwSeToNeSw,
|
||||
fitBounds,
|
||||
meters2ScreenPixels,
|
||||
tile2LatLng,
|
||||
latLng2Tile,
|
||||
getTilesIds,
|
||||
});
|
||||
|
||||
export default GoogleMap;
|
||||
10
src/index.js
10
src/index.js
@ -1,3 +1,13 @@
|
||||
import GoogleMap from './google_map';
|
||||
|
||||
export {
|
||||
convertNeSwToNwSe,
|
||||
convertNwSeToNeSw,
|
||||
fitBounds,
|
||||
meters2ScreenPixels,
|
||||
tile2LatLng,
|
||||
latLng2Tile,
|
||||
getTilesIds,
|
||||
} from './lib';
|
||||
|
||||
export default GoogleMap;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user