Skip to content

Commit

Permalink
feat: mixing named and default exports
Browse files Browse the repository at this point in the history
  • Loading branch information
hujiulong committed Apr 28, 2018
1 parent 4fd8e1e commit 102fb42
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
4 changes: 1 addition & 3 deletions rollup.config.js
Expand Up @@ -2,7 +2,7 @@ import pkg from './package.json'
import babel from 'rollup-plugin-babel';

const banner = `/* @preserve
* gcoord ${pkg.version}, a JS library for transform geographical coordinates.
* gcoord ${pkg.version}, ${pkg.description}
* Copyright (c) 2018 Jiulong Hu <me@hujiulong.com>
*/
`;
Expand All @@ -15,14 +15,12 @@ export default {
format: 'umd',
name: pkg.name,
banner: banner,
exports: 'named',
sourcemap: true
},
{
file: pkg.module,
format: 'es',
banner: banner,
exports: 'named',
sourcemap: true
}
],
Expand Down
49 changes: 47 additions & 2 deletions src/index.js
@@ -1,2 +1,47 @@
export * from './constants.js'
export { transform } from './transform.js'
import {
WGS84,
WGS1984,
GCJ02,
BD09,
EPSG4326,
EPSG3857,
EPSG900913,
Baidu,
BMap,
AMap,
WebMercator
} from './constants.js'

import { transform } from './transform.js'

export {
WGS84,
WGS1984,
GCJ02,
BD09,
EPSG4326,
EPSG3857,
EPSG900913,
Baidu,
BMap,
AMap,
WebMercator,

transform
}

export default {
WGS84,
WGS1984,
GCJ02,
BD09,
EPSG4326,
EPSG3857,
EPSG900913,
Baidu,
BMap,
AMap,
WebMercator,

transform
}

0 comments on commit 102fb42

Please sign in to comment.