Cocos Creator
Editor.Builder
This document is just a brief introduction to the API. For details on its usage, please refer to Custom Project Build Process.
Methods
Editor.Builder.on(eventName, callback)
eventName
string - The name of the eventcallback
function - The event callbackoptions
object - Callback params, the build optionscb
function - Need to callcb
when the callback process finished
Editor.Builder.once(eventName, callback)
eventName
string - The name of the eventcallback
function - The event callbackoptions
object - Callback params, the build optionscb
function - Need to callcb
when the callback process finished
Editor.Builder.removeListener(eventName, callback)
eventName
string - The name of the eventcallback
function - The event callback
Events
Event: 'build-finished'
Emit when build finished
Event: 'compile-finished'
Emit when compile finished
Event: 'before-change-files'
Emit before editor modifies the build files (e.g, before encryption js files)