mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 11:20:11 +00:00
chore: change build scripts
This commit is contained in:
parent
8e2e22dae1
commit
0014b6aae8
@ -19,8 +19,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:cov": ""
|
"test:cov": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@ -23,8 +23,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:cov": ""
|
"test:cov": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@ -3,13 +3,13 @@
|
|||||||
"version": "2.0.0-beta.0",
|
"version": "2.0.0-beta.0",
|
||||||
"description": "alibaba lowcode editor skeleton",
|
"description": "alibaba lowcode editor skeleton",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/designer.cjs",
|
"main": "dist/editorSkeleton.cjs",
|
||||||
"module": "dist/designer.js",
|
"module": "dist/editorSkeleton.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"import": "./dist/designer.js",
|
"import": "./dist/editorSkeleton.js",
|
||||||
"require": "./dist/designer.cjs",
|
"require": "./dist/editorSkeleton.cjs",
|
||||||
"types": "./dist/index.d.ts"
|
"types": "./dist/index.d.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -22,8 +22,9 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "pnpm run --stream \"/^build:.*/\"",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:target": "vite build",
|
||||||
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@ -1,50 +1,45 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-engine",
|
"name": "@alilc/lowcode-engine",
|
||||||
"version": "1.3.2",
|
"version": "2.0.0-beta.0",
|
||||||
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
|
"description": "An enterprise-class low-code technology stack with scale-out design / 一套面向扩展设计的企业级低代码技术体系",
|
||||||
"main": "lib/engine-core.js",
|
"main": "dist/engine-core.js",
|
||||||
"module": "es/engine-core.js",
|
"module": "dist/engine-core.js",
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
"es",
|
"es",
|
||||||
"lib"
|
"lib"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "build-scripts start",
|
|
||||||
"version:update": "node ./scripts/version.js",
|
"version:update": "node ./scripts/version.js",
|
||||||
"build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build",
|
"test": "vitest"
|
||||||
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json",
|
|
||||||
"test": "build-scripts test --config build.test.json --jest-passWithNoTests"
|
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alifd/next": "^1.19.12",
|
"@alifd/next": "^1.27.8",
|
||||||
"@alilc/lowcode-designer": "1.3.2",
|
"@alilc/lowcode-designer": "workspace:*",
|
||||||
"@alilc/lowcode-editor-core": "1.3.2",
|
"@alilc/lowcode-editor-core": "workspace:*",
|
||||||
"@alilc/lowcode-editor-skeleton": "1.3.2",
|
"@alilc/lowcode-editor-skeleton": "workspace:*",
|
||||||
"@alilc/lowcode-engine-ext": "^1.0.0",
|
"@alilc/lowcode-engine-ext": "^1.0.0",
|
||||||
"@alilc/lowcode-plugin-command": "1.3.2",
|
"@alilc/lowcode-plugin-command": "workspace:*",
|
||||||
"@alilc/lowcode-plugin-designer": "1.3.2",
|
"@alilc/lowcode-plugin-designer": "workspace:*",
|
||||||
"@alilc/lowcode-plugin-outline-pane": "1.3.2",
|
"@alilc/lowcode-plugin-outline-pane": "workspace:*",
|
||||||
"@alilc/lowcode-shell": "1.3.2",
|
"@alilc/lowcode-shell": "workspace:*",
|
||||||
"@alilc/lowcode-utils": "1.3.2",
|
"@alilc/lowcode-utils": "workspace:*",
|
||||||
"@alilc/lowcode-workspace": "1.3.2",
|
"@alilc/lowcode-workspace": "workspace:*",
|
||||||
|
"prop-types": "^15.7.2",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alib/build-scripts": "^0.1.18",
|
|
||||||
"@alifd/theme-lowcode-dark": "^0.2.0",
|
"@alifd/theme-lowcode-dark": "^0.2.0",
|
||||||
"@alifd/theme-lowcode-light": "^0.2.0",
|
"@alifd/theme-lowcode-light": "^0.2.0",
|
||||||
"@types/domready": "^1.0.0",
|
|
||||||
"@types/react": "^18.2.0",
|
"@types/react": "^18.2.0",
|
||||||
"@types/react-dom": "^18.2.0",
|
"@types/react-dom": "^18.2.0"
|
||||||
"build-plugin-fusion": "0.1.17-beta.0",
|
},
|
||||||
"build-plugin-moment-locales": "^0.1.0",
|
"peerDependencies": {
|
||||||
"build-plugin-react-app": "^1.8.0",
|
"@alifd/next": "^1.27.8",
|
||||||
"fs-extra": "^10.0.0",
|
"react": "^18.2.0",
|
||||||
"prop-types": "^15.7.2",
|
"react-dom": "^18.2.0"
|
||||||
"tsconfig-paths-webpack-plugin": "^3.2.0"
|
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "lib"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": ["src"]
|
||||||
"./src/"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -25,8 +25,8 @@
|
|||||||
"*.css"
|
"*.css"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
module.exports = require('../../babel.config');
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": ["@alilc/build-plugin-lce", "./build.plugin.js"]
|
|
||||||
}
|
|
||||||
@ -1,5 +0,0 @@
|
|||||||
module.exports = ({ onGetWebpackConfig }) => {
|
|
||||||
onGetWebpackConfig((config) => {
|
|
||||||
config.performance.hints(false);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"plugins": [
|
|
||||||
"@alilc/build-plugin-lce",
|
|
||||||
"@alilc/lowcode-test-mate/plugin/index.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
"entry": {
|
|
||||||
"react-simulator-renderer": "src/index"
|
|
||||||
},
|
|
||||||
"sourceMap": true,
|
|
||||||
"library": "___ReactSimulatorRenderer___",
|
|
||||||
"libraryTarget": "umd",
|
|
||||||
"externals": {
|
|
||||||
"react": "var window.React",
|
|
||||||
"react-dom": "var window.ReactDOM",
|
|
||||||
"prop-types": "var window.PropTypes",
|
|
||||||
"@alifd/next": "var Next",
|
|
||||||
"@alilc/lowcode-engine-ext": "var window.AliLowCodeEngineExt",
|
|
||||||
"moment": "var moment",
|
|
||||||
"lodash": "var _"
|
|
||||||
},
|
|
||||||
"polyfill": false,
|
|
||||||
"outputDir": "dist",
|
|
||||||
"vendor": false,
|
|
||||||
"ignoreHtmlTemplate": true,
|
|
||||||
"plugins": [
|
|
||||||
"build-plugin-react-app",
|
|
||||||
[
|
|
||||||
"build-plugin-fusion",
|
|
||||||
{
|
|
||||||
"externalNext": "umd"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"build-plugin-moment-locales",
|
|
||||||
{
|
|
||||||
"locales": ["zh-cn"]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"./build.plugin.js"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
const fs = require('fs');
|
|
||||||
const { join } = require('path');
|
|
||||||
const esModules = [].join('|');
|
|
||||||
const pkgNames = fs.readdirSync(join('..')).filter(pkgName => !pkgName.startsWith('.'));
|
|
||||||
|
|
||||||
const jestConfig = {
|
|
||||||
// transform: {
|
|
||||||
// '^.+\\.[jt]sx?$': 'babel-jest',
|
|
||||||
// // '^.+\\.(ts|tsx)$': 'ts-jest',
|
|
||||||
// // '^.+\\.(js|jsx)$': 'babel-jest',
|
|
||||||
// },
|
|
||||||
// testMatch: ['**/document/node/node.test.ts'],
|
|
||||||
// testMatch: ['**/designer/builtin-hotkey.test.ts'],
|
|
||||||
// testMatch: ['**/plugin/plugin-manager.test.ts'],
|
|
||||||
// testMatch: ['(/tests?/.*(test))\\.[jt]s$'],
|
|
||||||
transformIgnorePatterns: [
|
|
||||||
`/node_modules/(?!${esModules})/`,
|
|
||||||
],
|
|
||||||
setupFiles: ['./test/utils/host.ts'],
|
|
||||||
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
|
|
||||||
collectCoverage: true,
|
|
||||||
collectCoverageFrom: [
|
|
||||||
'src/**/*.ts',
|
|
||||||
'!src/**/*.d.ts',
|
|
||||||
'!**/node_modules/**',
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
// 只对本仓库内的 pkg 做 mapping
|
|
||||||
jestConfig.moduleNameMapper = {};
|
|
||||||
jestConfig.moduleNameMapper[`^@alilc/lowcode\\-(${pkgNames.join('|')})$`] = '<rootDir>/../$1/src';
|
|
||||||
|
|
||||||
module.exports = jestConfig;
|
|
||||||
@ -1,39 +1,37 @@
|
|||||||
{
|
{
|
||||||
"name": "@alilc/lowcode-react-simulator-renderer",
|
"name": "@alilc/lowcode-react-simulator-renderer",
|
||||||
"version": "1.3.2",
|
"version": "2.0.0-beta.0",
|
||||||
"description": "react simulator renderer for alibaba lowcode designer",
|
"description": "react simulator renderer for alibaba lowcode designer",
|
||||||
|
"type": "module",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"module": "es/index.js",
|
"module": "es/index.js",
|
||||||
|
"types": "",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"files": [
|
"files": [
|
||||||
"es",
|
"dist",
|
||||||
"lib",
|
"src",
|
||||||
"dist"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "build-scripts test --config build.test.json",
|
"build:target": "vite build",
|
||||||
"build": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"build:umd": "NODE_OPTIONS=--max_old_space_size=8192 build-scripts build --config build.umd.json",
|
"test": "vitest",
|
||||||
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
|
"test:cov": "build-scripts test --config build.test.json --jest-coverage"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@alilc/lowcode-designer": "1.3.2",
|
"@alilc/lowcode-designer": "workspace:*",
|
||||||
"@alilc/lowcode-react-renderer": "1.3.2",
|
"@alilc/lowcode-react-renderer": "workspace:*",
|
||||||
"@alilc/lowcode-types": "1.3.2",
|
"classnames": "^2.5.1",
|
||||||
"@alilc/lowcode-utils": "1.3.2",
|
|
||||||
"classnames": "^2.2.6",
|
|
||||||
"mobx": "^6.3.0",
|
|
||||||
"mobx-react": "^7.2.0",
|
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0"
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alib/build-scripts": "^0.1.18",
|
|
||||||
"@types/classnames": "^2.2.7",
|
|
||||||
"@types/node": "^13.7.1",
|
|
||||||
"@types/react": "^18.2.0",
|
"@types/react": "^18.2.0",
|
||||||
"@types/react-dom": "^18.2.0",
|
"@types/react-dom": "^18.2.0"
|
||||||
"@types/react-router": "5.1.18"
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public",
|
"access": "public",
|
||||||
|
|||||||
17
packages/react-simulator-renderer/src.bak/index.ts
Normal file
17
packages/react-simulator-renderer/src.bak/index.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import { runInAction } from 'mobx';
|
||||||
|
import renderer from './renderer';
|
||||||
|
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
(window as any).SimulatorRenderer = renderer;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener('beforeunload', () => {
|
||||||
|
runInAction(() => {
|
||||||
|
(window as any).LCSimulatorHost = null;
|
||||||
|
renderer.dispose?.();
|
||||||
|
(window as any).SimulatorRenderer = null;
|
||||||
|
(window as any).ReactDOM.unmountComponentAtNode(document.getElementById('app'));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
export default renderer;
|
||||||
@ -1,17 +0,0 @@
|
|||||||
import { runInAction } from 'mobx';
|
|
||||||
import renderer from './renderer';
|
|
||||||
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
(window as any).SimulatorRenderer = renderer;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('beforeunload', () => {
|
|
||||||
runInAction(() => {
|
|
||||||
(window as any).LCSimulatorHost = null;
|
|
||||||
renderer.dispose?.();
|
|
||||||
(window as any).SimulatorRenderer = null;
|
|
||||||
(window as any).ReactDOM.unmountComponentAtNode(document.getElementById('app'));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
export default renderer;
|
|
||||||
30
packages/react-simulator-renderer/vite.config.ts
Normal file
30
packages/react-simulator-renderer/vite.config.ts
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
import { defineConfig } from 'vite';
|
||||||
|
import { resolve } from 'node:path';
|
||||||
|
import react from '@vitejs/plugin-react';
|
||||||
|
import { devDependencies, peerDependencies } from './package.json';
|
||||||
|
|
||||||
|
const externals = [...Object.keys(devDependencies), ...Object.keys(peerDependencies)];
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
lib: {
|
||||||
|
// Could also be a dictionary or array of multiple entry points
|
||||||
|
entry: resolve(import.meta.dirname, 'src/index.ts'),
|
||||||
|
name: 'LowCodeSimulatorReactRenderer',
|
||||||
|
formats: ['es', 'cjs', 'iife'],
|
||||||
|
// the proper extensions will be added
|
||||||
|
fileName: 'SimulatorReactRenderer',
|
||||||
|
},
|
||||||
|
rollupOptions: {
|
||||||
|
external: externals,
|
||||||
|
output: {
|
||||||
|
// for UMD
|
||||||
|
globals: {
|
||||||
|
react: 'React',
|
||||||
|
'react-dom': 'ReactDOM',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [react()],
|
||||||
|
});
|
||||||
0
packages/react-simulator-renderer/vitest.config.ts
Normal file
0
packages/react-simulator-renderer/vitest.config.ts
Normal file
@ -21,8 +21,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest --run",
|
"test": "vitest --run",
|
||||||
"test:watch": "vitest"
|
"test:watch": "vitest"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -17,8 +17,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -10,10 +10,10 @@ export default defineConfig({
|
|||||||
lib: {
|
lib: {
|
||||||
// Could also be a dictionary or array of multiple entry points
|
// Could also be a dictionary or array of multiple entry points
|
||||||
entry: resolve(import.meta.dirname, 'src/index.ts'),
|
entry: resolve(import.meta.dirname, 'src/index.ts'),
|
||||||
name: 'LowCodeRendererCore',
|
name: 'LowCodeReactRenderer',
|
||||||
formats: ['es', 'cjs', 'iife'],
|
formats: ['es', 'cjs', 'iife'],
|
||||||
// the proper extensions will be added
|
// the proper extensions will be added
|
||||||
fileName: 'rendererReact',
|
fileName: 'reactRenderer',
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: externals,
|
external: externals,
|
||||||
|
|||||||
@ -15,8 +15,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -10,8 +10,8 @@
|
|||||||
"es"
|
"es"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@ -1,8 +1,5 @@
|
|||||||
import { globalContext } from '@alilc/lowcode-editor-core';
|
import { globalContext } from '@alilc/lowcode-editor-core';
|
||||||
import {
|
import { IDesigner, isComponentMeta } from '@alilc/lowcode-designer';
|
||||||
IDesigner,
|
|
||||||
isComponentMeta,
|
|
||||||
} from '@alilc/lowcode-designer';
|
|
||||||
import { IPublicTypeAssetsJson, getLogger } from '@alilc/lowcode-utils';
|
import { IPublicTypeAssetsJson, getLogger } from '@alilc/lowcode-utils';
|
||||||
import {
|
import {
|
||||||
IPublicTypeComponentAction,
|
IPublicTypeComponentAction,
|
||||||
@ -47,7 +44,10 @@ export class Material implements IPublicApiMaterial {
|
|||||||
return this[editorSymbol].get('designer')!;
|
return this[editorSymbol].get('designer')!;
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(editor: IPublicModelEditor, readonly workspaceMode: boolean = false) {
|
constructor(
|
||||||
|
editor: IPublicModelEditor,
|
||||||
|
readonly workspaceMode: boolean = false,
|
||||||
|
) {
|
||||||
this[innerEditorSymbol] = editor;
|
this[innerEditorSymbol] = editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,9 +176,9 @@ export class Material implements IPublicApiMaterial {
|
|||||||
* @param handle
|
* @param handle
|
||||||
*/
|
*/
|
||||||
modifyBuiltinComponentAction(
|
modifyBuiltinComponentAction(
|
||||||
actionName: string,
|
actionName: string,
|
||||||
handle: (action: IPublicTypeComponentAction) => void,
|
handle: (action: IPublicTypeComponentAction) => void,
|
||||||
) {
|
) {
|
||||||
this[designerSymbol].componentActions.modifyBuiltinComponentAction(actionName, handle);
|
this[designerSymbol].componentActions.modifyBuiltinComponentAction(actionName, handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,7 +195,7 @@ export class Material implements IPublicApiMaterial {
|
|||||||
];
|
];
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
dispose.forEach(d => d && d());
|
dispose.forEach((d) => d && d());
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -207,7 +207,9 @@ export class Material implements IPublicApiMaterial {
|
|||||||
this[designerSymbol].contextMenuActions.removeMenuAction(name);
|
this[designerSymbol].contextMenuActions.removeMenuAction(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
adjustContextMenuLayout(fn: (actions: IPublicTypeContextMenuItem[]) => IPublicTypeContextMenuItem[]) {
|
adjustContextMenuLayout(
|
||||||
|
fn: (actions: IPublicTypeContextMenuItem[]) => IPublicTypeContextMenuItem[],
|
||||||
|
) {
|
||||||
this[designerSymbol].contextMenuActions.adjustMenuLayout(fn);
|
this[designerSymbol].contextMenuActions.adjustMenuLayout(fn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,8 +20,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -22,8 +22,8 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build:target": "vite build",
|
||||||
"build-dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest"
|
"test": "vitest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@ -15,7 +15,9 @@
|
|||||||
"package.json"
|
"package.json"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"build": "pnpm run \"/^build:.*/\"",
|
||||||
|
"build:target": "vite build",
|
||||||
|
"build:dts": "tsc -p tsconfig.declaration.json && node ../../scripts/rollup-dts.mjs",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:cov": ""
|
"test:cov": ""
|
||||||
},
|
},
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
lerna run build \
|
|
||||||
--scope @alilc/lowcode-types \
|
|
||||||
--scope @alilc/lowcode-utils \
|
|
||||||
--scope @alilc/lowcode-shell \
|
|
||||||
--scope @alilc/lowcode-editor-core \
|
|
||||||
--scope @alilc/lowcode-editor-skeleton \
|
|
||||||
--scope @alilc/lowcode-designer \
|
|
||||||
--scope @alilc/lowcode-plugin-designer \
|
|
||||||
--scope @alilc/lowcode-plugin-command \
|
|
||||||
--scope @alilc/lowcode-plugin-outline-pane \
|
|
||||||
--scope @alilc/lowcode-react-renderer \
|
|
||||||
--scope @alilc/lowcode-react-simulator-renderer \
|
|
||||||
--scope @alilc/lowcode-renderer-core \
|
|
||||||
--scope @alilc/lowcode-workspace \
|
|
||||||
--scope @alilc/lowcode-engine \
|
|
||||||
--stream
|
|
||||||
|
|
||||||
lerna run build:umd \
|
|
||||||
--scope @alilc/lowcode-engine \
|
|
||||||
--scope @alilc/lowcode-react-simulator-renderer \
|
|
||||||
--scope @alilc/lowcode-react-renderer \
|
|
||||||
--stream
|
|
||||||
|
|
||||||
cp ./packages/react-simulator-renderer/dist/js/* ./packages/engine/dist/js/
|
|
||||||
cp ./packages/react-simulator-renderer/dist/css/* ./packages/engine/dist/css/
|
|
||||||
0
scripts/dev.mjs
Normal file
0
scripts/dev.mjs
Normal file
Loading…
x
Reference in New Issue
Block a user