Skip to content

Commit

Permalink
update gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj committed Jul 23, 2023
1 parent 30ee624 commit a75229c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ async function buildModules(options) {

const exportNamespace = `
export const __namespace = {
Cesium: exports.Cesium
Cesium: exports.Cesium,
Supercluster: exports.Supercluster
}
`

Expand Down
3 changes: 2 additions & 1 deletion libs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
**/

import * as Cesium from '@cesium/engine'
import Supercluster from 'supercluster'

export { Cesium }
export { Cesium, Supercluster }
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ export function ready(options = {}) {
registerLib('echarts', options['echarts'])
}

if (options['Supercluster']) {
registerLib('Supercluster', options['Supercluster'])
} else {
registerLib('Supercluster', this['__namespace']['Supercluster'])
}

this['__cmdOut'] && this['__cmdOut']()

return new Promise((resolve, reject) => {
Expand Down
3 changes: 1 addition & 2 deletions src/modules/layer/type/ClusterLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
* @Author : Caven Chen
*/

import Supercluster from 'supercluster'
import { Cesium } from '../../../namespace'
import { Cesium, Supercluster } from '../../../namespace'
import State from '../../state/State'
import Layer from '../Layer'
import Parse from '../../parse/Parse'
Expand Down
2 changes: 2 additions & 0 deletions src/namespace/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ export const Cesium = getLib('Cesium')
export const turf = getLib('turf')

export const echarts = getLib('echarts')

export const Supercluster = getLib('Supercluster')

0 comments on commit a75229c

Please sign in to comment.