MCPcopy Create free account
hub / github.com/Easy-Editor/EasyEditor / init

Function init

packages/core/src/engine/engine.ts:56–71  ·  view source on GitHub ↗
(options?: ConfigOptions)

Source from the content-addressed store, hash-verified

54let isInit = false
55
56export const init = async (options?: ConfigOptions) => {
57 await destroy()
58
59 if (options) {
60 config.setEngineOptions(options)
61 }
62
63 logger.info('plugins extending...')
64 await plugins.extend()
65
66 logger.info('plugins initing...')
67 await plugins.init()
68
69 isInit = true
70 logger.info('Engine initialization successfully')
71}
72
73export const destroy = async () => {
74 if (!isInit) return

Callers 3

index.tsFile · 0.90
index.tsFile · 0.90
initMethod · 0.70

Calls 5

destroyFunction · 0.85
setEngineOptionsMethod · 0.80
infoMethod · 0.80
extendMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected