| 'utf8' | 'utf8' | ||||
| ) | ) | ||||
| const exportCmdOut = ` | |||||
| export function __cmdOut() { | |||||
| const cmdOutFunction = ` | |||||
| function __cmdOut() { | |||||
| ${cmdOut_content | ${cmdOut_content | ||||
| .replace('{{__VERSION__}}', packageJson.version) | .replace('{{__VERSION__}}', packageJson.version) | ||||
| .replace('{{__TIME__}}', getTime()) | .replace('{{__TIME__}}', getTime()) | ||||
| await fse.outputFile( | await fse.outputFile( | ||||
| dcPath, | dcPath, | ||||
| ` | ` | ||||
| ${exportVersion} | |||||
| ${exportCmdOut} | |||||
| ${content} | ${content} | ||||
| ${cmdOutFunction} | |||||
| ${exportVersion} | |||||
| `, | `, | ||||
| { | { | ||||
| encoding: 'utf8', | encoding: 'utf8', | ||||
| await fse.outputFile( | await fse.outputFile( | ||||
| dcPath, | dcPath, | ||||
| ` | ` | ||||
| ${exportNamespace} | |||||
| ${exportVersion} | |||||
| ${exportCmdOut} | |||||
| ${content} | ${content} | ||||
| ${exportVersion} | |||||
| ${exportNamespace} | |||||
| ${cmdOutFunction} | |||||
| `, | `, | ||||
| { | { | ||||
| encoding: 'utf8', | encoding: 'utf8', |
| } | } | ||||
| export function ready(options = {}) { | export function ready(options = {}) { | ||||
| __cmdOut && __cmdOut() | |||||
| if (options['baseUrl']) { | if (options['baseUrl']) { | ||||
| this.config.baseUrl = options['baseUrl'] | this.config.baseUrl = options['baseUrl'] | ||||
| } | } | ||||
| registerLib('Supercluster', this['__namespace']['Supercluster']) | registerLib('Supercluster', this['__namespace']['Supercluster']) | ||||
| } | } | ||||
| this['__cmdOut'] && this['__cmdOut']() | |||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| const Cesium = getLib('Cesium') | const Cesium = getLib('Cesium') | ||||
| if (!Cesium) { | if (!Cesium) { |