浏览代码

update cmdout

tags/3.3.0
cavencj 1年前
父节点
当前提交
1b6760b6d1
共有 2 个文件被更改,包括 9 次插入10 次删除
  1. 7
    8
      gulpfile.js
  2. 2
    2
      src/index.js

+ 7
- 8
gulpfile.js 查看文件

@@ -97,8 +97,8 @@ async function buildModules(options) {
'utf8'
)

const exportCmdOut = `
export function __cmdOut() {
const cmdOutFunction = `
function __cmdOut() {
${cmdOut_content
.replace('{{__VERSION__}}', packageJson.version)
.replace('{{__TIME__}}', getTime())
@@ -123,10 +123,9 @@ async function buildModules(options) {
await fse.outputFile(
dcPath,
`
${exportVersion}
${exportCmdOut}
${content}

${cmdOutFunction}
${exportVersion}
`,
{
encoding: 'utf8',
@@ -145,10 +144,10 @@ async function buildModules(options) {
await fse.outputFile(
dcPath,
`
${exportNamespace}
${exportVersion}
${exportCmdOut}
${content}
${exportVersion}
${exportNamespace}
${cmdOutFunction}
`,
{
encoding: 'utf8',

+ 2
- 2
src/index.js 查看文件

@@ -19,6 +19,8 @@ export const config = {
}

export function ready(options = {}) {
__cmdOut && __cmdOut()

if (options['baseUrl']) {
this.config.baseUrl = options['baseUrl']
}
@@ -42,8 +44,6 @@ export function ready(options = {}) {
registerLib('Supercluster', this['__namespace']['Supercluster'])
}

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

return new Promise((resolve, reject) => {
const Cesium = getLib('Cesium')
if (!Cesium) {

正在加载...
取消
保存