diff --git a/html/index.html b/html/index.html new file mode 100644 index 000000000..b3eeefd68 --- /dev/null +++ b/html/index.html @@ -0,0 +1,29 @@ + + + + + + + LowCodeEngine DEMO + + + + + + + + + + + + + + + +
+ + + + + + diff --git a/html/preview.html b/html/preview.html new file mode 100644 index 000000000..c8f2cfdcb --- /dev/null +++ b/html/preview.html @@ -0,0 +1,21 @@ + + + + + + + LowCodeEngine DEMO + + + + + + + + + + + +
+ + diff --git a/package.json b/package.json index 50ed01cc7..b03421dbf 100644 --- a/package.json +++ b/package.json @@ -4,10 +4,10 @@ "clean": "rm -rf ./packages/*/lib ./packages/*/es ./packages/*/dist ./packages/*/build", "setup": "./scripts/setup.sh", "start": "./scripts/start.sh", - "build": "lerna exec -- npm run build", + "build": "lerna run build", "test": "lerna run test", "test:snapshot": "lerna run test:snapshot", - "pub": "npm run test && lerna publish", + "pub": "lerna publish", "commit": "git-cz" }, "devDependencies": { diff --git a/packages/demo/build.json b/packages/demo/build.json index 623ad7a36..7576a6485 100644 --- a/packages/demo/build.json +++ b/packages/demo/build.json @@ -9,10 +9,7 @@ }, "publicPath": "/", "externals": { - "react": "var window.React", - "react-dom": "var window.ReactDOM", - "prop-types": "var window.PropTypes", - "@alifd/next": "var window.Next" + "prop-types": "var window.PropTypes" }, "plugins": [ ["build-plugin-react-app"], diff --git a/packages/demo/cloud-build.json b/packages/demo/cloud-build.json new file mode 100644 index 000000000..0e1529916 --- /dev/null +++ b/packages/demo/cloud-build.json @@ -0,0 +1,30 @@ +{ + "entry": { + "lowcode-demo": "src/index.jsx" + }, + "vendor": false, + "externals": { + "prop-types": "PropTypes", + "@ali/lowcode-globals": "LCEGlobals" + }, + "minify": false, + "sourcemap": true, + "outputAssetsPath": { + "js": "", "css": "" + }, + "plugins": [ + ["build-plugin-react-app"], + [ + "build-plugin-fusion", + { + "themePackage": "@alife/theme-lowcode-light" + } + ], + [ + "build-plugin-moment-locales", + { + "locales": ["zh-cn"] + } + ] + ] +} diff --git a/packages/demo/package.json b/packages/demo/package.json index 2efe9ba32..989cfae3e 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -3,15 +3,16 @@ "version": "0.8.0", "description": "低代码引擎 DEMO", "scripts": { - "start": "build-scripts start" + "start": "build-scripts start", + "cloud-build": "build-scripts build --config cloud-build.json" }, "dependencies": { "@ali/lowcode-editor-core": "^0.8", "@ali/lowcode-editor-skeleton": "^0.8.0", "@ali/lowcode-plugin-components-pane": "^0.8.0", "@ali/lowcode-plugin-designer": "^0.8.0", - "@ali/lowcode-plugin-logo": "^0.8.0", - "@ali/lowcode-plugin-save": "^0.8.0", + "@ali/lowcode-plugin-sample-logo": "^0.8.0", + "@ali/lowcode-plugin-sample-preview": "^0.8.0", "@ali/lowcode-plugin-undo-redo": "^0.8.0", "@alife/theme-lowcode-dark": "^0.1.0", "@alife/theme-lowcode-light": "^0.1.0", diff --git a/packages/demo/src/config/skeleton.js b/packages/demo/src/config/skeleton.js index bb27da830..035d9a0c5 100644 --- a/packages/demo/src/config/skeleton.js +++ b/packages/demo/src/config/skeleton.js @@ -119,11 +119,11 @@ export default { shortCuts: [], lifeCycles: { init: async function init(editor) { - const assets = await editor.utils.get('/assets.json'); + const assets = await editor.utils.get('./assets.json'); editor.set('assets', assets); editor.emit('assets.loaded', assets); - const schema = await editor.utils.get('/schema.json'); + const schema = await editor.utils.get('./schema.json'); editor.set('schema', schema); editor.emit('schema.loaded', schema); } diff --git a/packages/designer/package.json b/packages/designer/package.json index fffbefe82..ba93de0fd 100644 --- a/packages/designer/package.json +++ b/packages/designer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-designer", - "version": "0.8.0", + "version": "0.8.1", "description": "Designer for Ali LowCode Engine", "main": "lib/index.js", "module": "es/index.js", diff --git a/packages/editor-core/package.json b/packages/editor-core/package.json index 1c38c2428..c5c46418c 100644 --- a/packages/editor-core/package.json +++ b/packages/editor-core/package.json @@ -38,5 +38,7 @@ "build-plugin-component": "^0.2.10" }, "license": "MIT", - "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-editor-core@0.0.1/build/index.html" + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" + } } diff --git a/packages/editor-skeleton/package.json b/packages/editor-skeleton/package.json index 88e18b62f..82cdf2609 100644 --- a/packages/editor-skeleton/package.json +++ b/packages/editor-skeleton/package.json @@ -36,9 +36,7 @@ "build-plugin-fusion": "^0.1.0", "build-plugin-moment-locales": "^0.1.0" }, - "repository": { - "type": "git", - "url": "https://github.com/ice-lab/react-materials/tree/master/scaffolds/ice-ts" - }, - "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-engine-skeleton@0.0.1/build/index.html" + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" + } } diff --git a/packages/globals/build.json b/packages/globals/build.json index 648cf3521..e791d5b6b 100644 --- a/packages/globals/build.json +++ b/packages/globals/build.json @@ -1,14 +1,6 @@ { "plugins": [ - [ - "build-plugin-component", - { - "filename": "globals", - "library": "LCEGlobals", - "libraryExport": "default", - "libraryTarget": "umd" - } - ], + "build-plugin-component", "build-plugin-fusion", ["build-plugin-moment-locales", { "locales": ["zh-cn"] diff --git a/packages/globals/cloud-build.json b/packages/globals/cloud-build.json new file mode 100644 index 000000000..648cf3521 --- /dev/null +++ b/packages/globals/cloud-build.json @@ -0,0 +1,17 @@ +{ + "plugins": [ + [ + "build-plugin-component", + { + "filename": "globals", + "library": "LCEGlobals", + "libraryExport": "default", + "libraryTarget": "umd" + } + ], + "build-plugin-fusion", + ["build-plugin-moment-locales", { + "locales": ["zh-cn"] + }] + ] +} diff --git a/packages/globals/package.json b/packages/globals/package.json index 320fe3dde..ee79abf6c 100644 --- a/packages/globals/package.json +++ b/packages/globals/package.json @@ -6,11 +6,11 @@ "module": "es/index.js", "files": [ "lib", - "es", - "dist" + "es" ], "scripts": { "build": "build-scripts build --skip-demo", + "cloud-build": "build-scripts build --skip-demo --config cloud-build.json", "test": "ava", "test:snapshot": "ava --update-snapshots" }, diff --git a/packages/plugin-components-pane/package.json b/packages/plugin-components-pane/package.json index afcde9c83..ae5a2e461 100644 --- a/packages/plugin-components-pane/package.json +++ b/packages/plugin-components-pane/package.json @@ -34,5 +34,8 @@ "build-plugin-component": "^0.2.7-1", "build-plugin-fusion": "^0.1.0", "build-plugin-moment-locales": "^0.1.0" + }, + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" } } diff --git a/packages/plugin-designer/package.json b/packages/plugin-designer/package.json index 2e9ad7792..73d09cf62 100644 --- a/packages/plugin-designer/package.json +++ b/packages/plugin-designer/package.json @@ -30,5 +30,8 @@ "@types/react-dom": "^16.9.4", "@alib/build-scripts": "^0.1.3", "build-plugin-component": "^0.2.7-1" + }, + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" } } diff --git a/packages/plugin-outline-pane/package.json b/packages/plugin-outline-pane/package.json index 9fba6389f..eb90dba0b 100644 --- a/packages/plugin-outline-pane/package.json +++ b/packages/plugin-outline-pane/package.json @@ -41,5 +41,8 @@ "ts-node/register" ] }, - "license": "MIT" + "license": "MIT", + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" + } } diff --git a/packages/plugin-sample-logo/package.json b/packages/plugin-sample-logo/package.json index 0f7ce418c..fbed27ea2 100644 --- a/packages/plugin-sample-logo/package.json +++ b/packages/plugin-sample-logo/package.json @@ -28,5 +28,8 @@ "@types/react": "^16.9.13", "@types/react-dom": "^16.9.4", "build-plugin-component": "^0.2.10" + }, + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" } } diff --git a/packages/plugin-sample-preview/package.json b/packages/plugin-sample-preview/package.json index 0e84e80b1..faca5d9a4 100644 --- a/packages/plugin-sample-preview/package.json +++ b/packages/plugin-sample-preview/package.json @@ -30,5 +30,8 @@ "build-plugin-component": "^0.2.11", "build-plugin-fusion": "^0.1.0", "build-plugin-moment-locales": "^0.1.0" + }, + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" } } diff --git a/packages/plugin-sample-save/package.json b/packages/plugin-sample-save/package.json index a1f7a4ee0..9b922cfb7 100644 --- a/packages/plugin-sample-save/package.json +++ b/packages/plugin-sample-save/package.json @@ -31,9 +31,7 @@ "build-plugin-fusion": "^0.1.0", "build-plugin-moment-locales": "^0.1.0" }, - "repository": { - "type": "git", - "url": "https://github.com/ice-lab/react-materials/tree/master/scaffolds/ice-ts" - }, - "homepage": "https://unpkg.alibaba-inc.com/@ali/lowcode-engine-skeleton@0.0.1/build/index.html" + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" + } } diff --git a/packages/plugin-settings-pane/package.json b/packages/plugin-settings-pane/package.json index 9cdec9710..5234e27a5 100644 --- a/packages/plugin-settings-pane/package.json +++ b/packages/plugin-settings-pane/package.json @@ -40,5 +40,8 @@ "ts-node/register" ] }, - "license": "MIT" + "license": "MIT", + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" + } } diff --git a/packages/plugin-undo-redo/package.json b/packages/plugin-undo-redo/package.json index fcd786bf1..fad11d855 100644 --- a/packages/plugin-undo-redo/package.json +++ b/packages/plugin-undo-redo/package.json @@ -31,5 +31,8 @@ "build-plugin-component": "^0.2.7-1", "build-plugin-fusion": "^0.1.0", "build-plugin-moment-locales": "^0.1.0" + }, + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" } } diff --git a/packages/react-renderer/package.json b/packages/react-renderer/package.json index 4d51ec5eb..a958b9fed 100644 --- a/packages/react-renderer/package.json +++ b/packages/react-renderer/package.json @@ -1,6 +1,6 @@ { "name": "@ali/lowcode-react-renderer", - "version": "0.8.0", + "version": "0.8.1", "description": "react renderer for ali lowcode engine", "main": "lib/index.js", "module": "es/index.js", diff --git a/packages/react-simulator-renderer/README.md b/packages/react-simulator-renderer/README.md index fdb644d7d..d4453a85b 100644 --- a/packages/react-simulator-renderer/README.md +++ b/packages/react-simulator-renderer/README.md @@ -1 +1,3 @@ 内置模拟器渲染进程 + +DO NOT tnpm publish diff --git a/packages/react-simulator-renderer/package.json b/packages/react-simulator-renderer/package.json index f13b7a319..95cb6c52c 100644 --- a/packages/react-simulator-renderer/package.json +++ b/packages/react-simulator-renderer/package.json @@ -5,20 +5,16 @@ "main": "lib/index.js", "module": "es/index.js", "license": "MIT", - "files": [ - "lib", - "es", - "dist" - ], + "files": [], "scripts": { - "build": "build-scripts build --skip-demo", + "cloud-build": "build-scripts build --skip-demo", "test": "ava", "test:snapshot": "ava --update-snapshots" }, "dependencies": { "@ali/lowcode-globals": "^0.8", "@ali/lowcode-designer": "^0.8", - "@ali/lowcode-react-renderer": "0.8.0-1", + "@ali/lowcode-react-renderer": "^0.8.0", "@recore/obx": "^1.0.8", "@recore/obx-react": "^1.0.7", "classnames": "^2.2.6", diff --git a/packages/setters/package.json b/packages/setters/package.json index c488703f3..13e1f5b05 100644 --- a/packages/setters/package.json +++ b/packages/setters/package.json @@ -52,5 +52,8 @@ "require": [ "ts-node/register" ] + }, + "publishConfig": { + "registry": "https://registry.npm.alibaba-inc.com" } } diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 2a54011b3..a620409a4 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -9,16 +9,26 @@ echo "Deploy ${PWD} -> ${BUILD_DEST} ..." echo "build globals" cd packages/globals tnpm ii -tnpm run build +tnpm run cloud-build cd $WORK_DIR -mv packages/globals/dist $BUILD_DEST # build simulator-renderer echo "build simulator-renderer" cd packages/react-simulator-renderer tnpm ii -tnpm run build +tnpm run cloud-build cd $WORK_DIR -mv packages/react-simulator-renderer/dist/* $BUILD_DEST +# build lowcode demo +echo "build lowcode demo" +cd packages/demo +tnpm ii +tnpm run cloud-build +cd $WORK_DIR + +mv packages/demo/build $BUILD_DEST +mv packages/react-simulator-renderer/dist/* $BUILD_DEST +mv packages/globals/dist/* $BUILD_DEST + +cp html/* $BUILD_DEST echo "complete"