mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-03-05 01:37:17 +00:00
18 lines
462 B
TypeScript
18 lines
462 B
TypeScript
import { bootstrapModules, createInstance } from '@alilc/lowcode-core';
|
|
import { EngineMain } from './main';
|
|
|
|
export async function init(
|
|
container?: HTMLElement,
|
|
options?: IPublicTypeEngineOptions,
|
|
pluginPreference?: PluginPreference,
|
|
) {
|
|
if (!container) {
|
|
container = document.createElement('div');
|
|
container.id = 'engine';
|
|
document.body.appendChild(container);
|
|
}
|
|
|
|
bootstrapModules();
|
|
createInstance(EngineMain).startup(container);
|
|
}
|