UNPKG

@alilc/build-plugin-alt

Version:

build-scripts plugin template for developers

34 lines (33 loc) 1.94 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const lowcode_engine_1 = require("@alilc/lowcode-engine"); const __lowcode_plugin_demo__1 = __importDefault(require("__lowcode-plugin-demo__")); const plugin_1 = __importDefault(require("./universal/plugin")); require("./universal/global.scss"); (() => __awaiter(void 0, void 0, void 0, function* () { yield lowcode_engine_1.plugins.register(__lowcode_plugin_demo__1.default); yield (0, plugin_1.default)({ type: 'plugin', demoPlugin: __lowcode_plugin_demo__1.default }); (0, lowcode_engine_1.init)(document.getElementById('lce-container'), { enableCondition: true, enableCanvasLock: true, disableDefaultSettingPanel: false, disableDefaultSetters: false, stayOnTheSameSettingTab: false, simulatorUrl: [ 'https://cdn.jsdelivr.net/npm/@alilc/lowcode-react-simulator-renderer@^1.0.0/dist/js/react-simulator-renderer.js', 'https://cdn.jsdelivr.net/npm/@alilc/lowcode-react-simulator-renderer@^1.0.0/dist/css/react-simulator-renderer.css' ], }); }))();