Skip to content

Commit

Permalink
update cmdout
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj committed Jan 20, 2024
1 parent b8c4aba commit 1b6760b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
15 changes: 7 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -123,10 +123,9 @@ async function buildModules(options) {
await fse.outputFile(
dcPath,
`
${exportVersion}
${exportCmdOut}
${content}
${cmdOutFunction}
${exportVersion}
`,
{
encoding: 'utf8',
Expand All @@ -145,10 +144,10 @@ async function buildModules(options) {
await fse.outputFile(
dcPath,
`
${exportNamespace}
${exportVersion}
${exportCmdOut}
${content}
${exportVersion}
${exportNamespace}
${cmdOutFunction}
`,
{
encoding: 'utf8',
Expand Down
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const config = {
}

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

if (options['baseUrl']) {
this.config.baseUrl = options['baseUrl']
}
Expand All @@ -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) {
Expand Down

0 comments on commit 1b6760b

Please sign in to comment.