chore: delete useless files

This commit is contained in:
1ncounter 2024-03-27 13:51:43 +08:00
parent 17f736b130
commit 8e2e22dae1
14 changed files with 74 additions and 142 deletions

View File

@ -1,10 +1,10 @@
name: Node CI
on:
push:
push:
branches:
- main
pull_request:
pull_request:
branches:
- main
@ -18,10 +18,10 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '18'
- name: install
run: npm i && npm run setup:skip-build
run: pnpm install
- name: test designer
run: cd packages/designer && npm run test:cov && cd ../..
@ -113,4 +113,4 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
name: code-generator
fail_ci_if_error: true
verbose: true
verbose: true

View File

@ -6,6 +6,8 @@ on:
- develop
paths:
- 'docs/docs/**'
pull_request:
types: [closed]
workflow_dispatch:
jobs:
@ -16,19 +18,17 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v2
with:
ref: 'develop'
node-version: '16'
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- run: cd docs && npm install
- run: pnpm install
- run: |
cd docs
npm version patch
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add package.json
git commit -m "chore(docs): publish documentation"
git push
- run: cd docs && npm run build && npm publish
- run: pnpm build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Get version
@ -40,8 +40,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Comment on PR
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
uses: actions/github-script@v4
if: github.event_name == 'pull_request' && github.action == 'closed' && github.event.pull_request.merged == true
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@ -49,5 +49,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🚀 New version has been released: ' + '${{ needs.publish-docs.outputs.version }}'
body: '🚀 New version has been released: ' + '${{ needs.publish-docs.outputs }}'
})

View File

@ -1,6 +0,0 @@
---
title: build-scripts 的使用文档
sidebar_position: 1
tags: [FAQ]
---
build-scripts 是一个开源项目,详见 [https://github.com/ice-lab/build-scripts](https://github.com/ice-lab/build-scripts)

View File

@ -5,7 +5,7 @@ sidebar_position: 0
### 环境准备
开发 LowcodeEngine 需要 Node.js 16+。
开发 LowcodeEngine 需要 Node.js 18+。
推荐使用 nvm 管理 Node.js避免权限问题的同时还能够随时切换当前使用的 Node.js 的版本。
@ -21,7 +21,7 @@ cd lowcode-engine
#### 安装依赖并构建
```
npm install && npm run setup
pnpm install
```
#### 调试环境配置
@ -29,6 +29,7 @@ npm install && npm run setup
本质上是将 demo 页面引入的几个 js/css 代理到 engine 项目,可以使用趁手的代理工具,这里推荐 [XSwitch](https://chrome.google.com/webstore/detail/xswitch/idkjhjggpffolpidfkikidcokdkdaogg?hl=en-US)。
本地开发代理规则如下:
```json
{
"proxy": [
@ -62,19 +63,19 @@ npm start
开启代理之后,就可以进行开发调试了。
### 贡献低代码引擎文档
#### 开发文档
在 lowcode-engine 目录下执行下面命令
```
cd docs
npm install
npm start
pnpm start
```
#### 维护方式
- 官方文档通过 github 管理文档源,官网文档与[主仓库 develop 分支](https://github.com/alibaba/lowcode-engine/tree/develop/docs)保持同步。
- 点击每篇文档下发的 `编辑此页` 可直接定位到 github 中位置。
- 欢迎 PR文档 PR 也会作为贡献者贡献,会用于贡献度统计。
@ -87,7 +88,6 @@ npm start
使用 vscode 进行编辑的朋友可以安装 vscode 插件 [huacnlee.autocorrect](https://github.com/huacnlee/autocorrect) 辅助文档 lint。
### 贡献低代码引擎生态
相关源码详见[NPM 包对应源码位置汇总](/site/docs/guide/appendix/npms)
@ -99,6 +99,7 @@ npm start
PR 被合并之后,我们会尽快发布相关的正式版本或者 beta 版本。
### 加入 Contributor 群
提交过 Bugfix 或 Feature 类 PR 的同学,如果有兴趣一起参与维护 LowcodeEngine我们提供了一个核心贡献者交流群。
1. 可以通过[填写问卷](https://survey.taobao.com/apps/zhiliao/4YEtu9gHF)的方式,参与到其中。
@ -115,4 +116,4 @@ PR 被合并之后,我们会尽快发布相关的正式版本或者 beta 版
- 如果你修复了 bug 或者添加了代码,而这些内容需要测试,请添加测试!
- 确保通过测试套件yarn test
- 请签订贡献者许可证协议Contributor License Agreement
> 如已签署 CLA 仍被提示需要签署,[解决办法](/site/docs/faq/faq021)
> 如已签署 CLA 仍被提示需要签署,[解决办法](/site/docs/faq/faq021)

View File

@ -1,16 +1,14 @@
{
"name": "lowcode-engine-repo",
"private": true,
"scripts": {
"playground": "pnpm --filter playground dev",
"build": "./scripts/build.sh",
"build:npm": "lerna run build --stream",
"build:umd": "lerna run build:umd --stream",
"clean": "rimraf ./packages/*/lib ./packages/*/es ./packages/*/dist ./packages/*/build",
"clean:lib": "rimraf ./node_modules",
"test": "pnpm -r test",
"build": "pnpm -r build",
"clean": "rimraf ./packages/*/dist",
"clean:lib": "rimraf ./node_modules ./packages/*/node_modules",
"lint": "f2elint scan -q -i ./packages/*/src",
"lint:fix": "f2elint fix -i ./packages/*/src",
"lint:modules": "f2elint scan -q -i ./modules/*/src",
"lint:modules:fix": "f2elint fix -i ./modules/*/src",
"pub": "npm run watchdog:build && lerna publish patch --yes --force-publish --exact --no-changelog",
"pub:minor": "npm run watchdog:build && lerna publish minor --yes --force-publish --exact --no-changelog",
"pub:major": "npm run watchdog:build && lerna publish major --yes --force-publish --exact --no-changelog",
@ -18,10 +16,6 @@
"pub:preminor": "npm run watchdog:build && lerna publish preminor --force-publish --exact --dist-tag beta --preid beta --no-changelog",
"pub:prepatch": "npm run watchdog:build && lerna publish prepatch --force-publish --exact --dist-tag beta --preid beta --no-changelog",
"pub:prerelease": "npm run watchdog:build && lerna publish prerelease --yes --force-publish --exact --dist-tag beta --preid beta --no-changelog",
"setup:skip-build": "./scripts/setup-skip-build.sh",
"test": "lerna run test --stream",
"test:snapshot": "lerna run test:snapshot",
"sync": "./scripts/sync.sh",
"syncOss": "node ./scripts/sync-oss.js"
},
"husky": {

View File

@ -20,15 +20,12 @@
[npm-image]: https://img.shields.io/npm/v/@alilc/lowcode-engine.svg?style=flat-square
[npm-url]: http://npmjs.org/package/@alilc/lowcode-engine
[download-image]: https://img.shields.io/npm/dm/@alilc/lowcode-engine.svg?style=flat-square
[download-url]: https://npmjs.org/package/@alilc/lowcode-engine
[help-wanted-image]: https://flat.badgen.net/github/label-issues/alibaba/lowcode-engine/help%20wanted/open
[help-wanted-url]: https://github.com/alibaba/lowcode-engine/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
[issues-helper-url]: https://github.com/actions-cool/issues-helper
[codecov-image-url]: https://codecov.io/gh/alibaba/lowcode-engine/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/alibaba/lowcode-engine
@ -73,8 +70,7 @@ skeleton.add({
name: 'logo',
content: YourFantasticLogo,
contentProps: {
logo:
'https://img.alicdn.com/tfs/TB1_SocGkT2gK0jSZFkXXcIQFXa-66-66.png',
logo: 'https://img.alicdn.com/tfs/TB1_SocGkT2gK0jSZFkXXcIQFXa-66-66.png',
href: '/',
},
props: {
@ -87,6 +83,7 @@ init(document.getElementById('lce'));
```
### 工程化配置:
```json
{
"externals": {
@ -97,35 +94,37 @@ init(document.getElementById('lce'));
```
### cdn 可选方式:
#### 方式 1推荐alifd cdn
```html
https://alifd.alicdn.com/npm/@alilc/lowcode-engine@1.0.18/dist/js/engine-core.js
https://alifd.alicdn.com/npm/@alilc/lowcode-react-simulator-renderer@1.0.18/dist/js/react-simulator-renderer.js
```
#### 方式 2推荐uipaas cdn
```html
https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.0.18/dist/js/engine-core.js
https://uipaas-assets.com/prod/npm/@alilc/lowcode-react-simulator-renderer/1.0.18/dist/js/react-simulator-renderer.js
```
#### 方式 3unpkg
```html
https://unpkg.com/@alilc/lowcode-engine@1.0.18/dist/js/engine-core.js
https://unpkg.com/@alilc/lowcode-react-simulator-renderer@1.0.18/dist/js/react-simulator-renderer.js
```
#### 方式 4jsdelivr
```html
https://cdn.jsdelivr.net/npm/@alilc/lowcode-engine@1.0.18/dist/js/engine-core.js
https://cdn.jsdelivr.net/npm/@alilc/lowcode-react-simulator-renderer@1.0.18/dist/js/react-simulator-renderer.js
```
#### 方式 5使用自有 cdn
将源码中 packages/engine/dist 和 packages/react-simulator-renderer/dist 下的文件传至你的 cdn 提供商
## 🔗 相关链接
@ -146,9 +145,8 @@ https://cdn.jsdelivr.net/npm/@alilc/lowcode-react-simulator-renderer@1.0.18/dist
```bash
$ git clone git@github.com:alibaba/lowcode-engine.git
$ cd lowcode-engine
$ npm install
$ npm run setup
$ npm start
$ pnpm install
$ pnpm playground
```
> 📢 npm 访问速度较慢,阿里员工可以使用 tnpm其他同学建议使用 cnpm 或者指定镜像 registry。
@ -160,6 +158,7 @@ lowcode-engine 启动后,提供了几个 umd 文件,可以结合 [lowcode-de
## 🤝 参与共建
请先阅读:
1. [如何配置引擎调试环境?](https://lowcode-engine.cn/site/docs/participate/prepare)
2. [关于引擎的研发协作流程](https://lowcode-engine.cn/site/docs/participate/flow)
3. [引擎的工程化配置](https://lowcode-engine.cn/site/docs/participate/config)

View File

@ -20,15 +20,12 @@ An enterprise-class low-code technology stack with scale-out design
[npm-image]: https://img.shields.io/npm/v/@alilc/lowcode-engine.svg?style=flat-square
[npm-url]: http://npmjs.org/package/@alilc/lowcode-engine
[download-image]: https://img.shields.io/npm/dm/@alilc/lowcode-engine.svg?style=flat-square
[download-url]: https://npmjs.org/package/@alilc/lowcode-engine
[help-wanted-image]: https://flat.badgen.net/github/label-issues/alibaba/lowcode-engine/help%20wanted/open
[help-wanted-url]: https://github.com/alibaba/lowcode-engine/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22
[issues-helper-image]: https://img.shields.io/badge/using-issues--helper-orange?style=flat-square
[issues-helper-url]: https://github.com/actions-cool/issues-helper
[codecov-image-url]: https://codecov.io/gh/alibaba/lowcode-engine/branch/main/graph/badge.svg
[codecov-url]: https://codecov.io/gh/alibaba/lowcode-engine
@ -73,8 +70,7 @@ skeleton.add({
name: 'logo',
content: YourFantasticLogo,
contentProps: {
logo:
'https://img.alicdn.com/tfs/TB1_SocGkT2gK0jSZFkXXcIQFXa-66-66.png',
logo: 'https://img.alicdn.com/tfs/TB1_SocGkT2gK0jSZFkXXcIQFXa-66-66.png',
href: '/',
},
props: {
@ -87,6 +83,7 @@ init(document.getElementById('lce'));
```
### Engineering configuration:
```json
{
"externals": {
@ -97,35 +94,37 @@ init(document.getElementById('lce'));
```
### cdn optional method:
#### Method 1: alifd cdn
```html
https://alifd.alicdn.com/npm/@alilc/lowcode-engine@1.0.18/dist/js/engine-core.js
https://alifd.alicdn.com/npm/@alilc/lowcode-react-simulator-renderer@1.0.18/dist/js/react-simulator-renderer.js
```
#### Method 2: uipaas cdn
```html
https://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/1.0.18/dist/js/engine-core.js
https://uipaas-assets.com/prod/npm/@alilc/lowcode-react-simulator-renderer/1.0.18/dist/js/react-simulator-renderer.js
```
#### Method 3: unpkg
```html
https://unpkg.com/@alilc/lowcode-engine@1.0.18/dist/js/engine-core.js
https://unpkg.com/@alilc/lowcode-react-simulator-renderer@1.0.18/dist/js/react-simulator-renderer.js
```
#### Method 4: jsdelivr
```html
https://cdn.jsdelivr.net/npm/@alilc/lowcode-engine@1.0.18/dist/js/engine-core.js
https://cdn.jsdelivr.net/npm/@alilc/lowcode-react-simulator-renderer@1.0.18/dist/js/react-simulator-renderer.js
```
#### Method 5: Use your own cdn
Pass the files under packages/engine/dist and packages/react-simulator-renderer/dist in the source code to your cdn provider
## 🔗 Related Links
@ -146,9 +145,8 @@ This [awesome-lowcode-engine](https://github.com/lowcode-workspace/awesome-lowco
```bash
$ git clone git@github.com:alibaba/lowcode-engine.git
$ cd lowcode-engine
$ npm install
$ npm run setup
$ npm start
$ pnpm install
$ pnpm playground
```
> 📢 npm access speed is slow, Alibaba employees can use tnpm, other students recommend using cnpm or specifying a mirror registry.
@ -160,6 +158,7 @@ After lowcode-engine is started, several umd files are provided, which can be de
## 🤝 Participation
Please read first:
1. [How to configure the engine debugging environment? ](https://lowcode-engine.cn/site/docs/participate/prepare)
2. [About the R&D collaboration process of the engine](https://lowcode-engine.cn/site/docs/participate/flow)
3. [Engineering Configuration of Engine](https://lowcode-engine.cn/site/docs/participate/config)
@ -167,6 +166,7 @@ Please read first:
> Strongly recommend reading ["The Wisdom of Asking Questions"](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way), ["How to Ask Questions to the Open Source Community"](https: //github.com/seajs/seajs/issues/545) and [How to Report Bugs Effectively](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html), [ "How to Submit Unanswerable Questions to Open Source Projects"](https://zhuanlan.zhihu.com/p/25795393), better questions are easier to get help. (This paragraph refers to [antd](https://github.com/ant-design/ant-design))
About Pull Request:
- set the target branch to **develop** other than **main**
## ❤️ Contributors

View File

@ -1,6 +1,7 @@
import {
Editor,
engineConfig, Setters as InnerSetters,
engineConfig,
Setters as InnerSetters,
Hotkey as InnerHotkey,
commonEvent,
IEngineConfig,
@ -16,10 +17,7 @@ import {
IDesigner,
ILowCodePluginManager,
} from '@alilc/lowcode-designer';
import {
ISkeleton,
Skeleton as InnerSkeleton,
} from '@alilc/lowcode-editor-skeleton';
import { ISkeleton, Skeleton as InnerSkeleton } from '@alilc/lowcode-editor-skeleton';
import {
Hotkey,
Plugins,
@ -55,10 +53,15 @@ import { getLogger, Logger as InnerLogger } from '@alilc/lowcode-utils';
import { IWorkspace } from '../workspace';
import { IEditorWindow } from '../window';
export interface IBasicContext extends BasicContext {
}
export interface IBasicContext extends BasicContext {}
export class BasicContext implements Omit<IPublicModelPluginContext, 'workspace' | 'commonUI' | 'command' | 'isPluginRegisteredInWorkspace' | 'editorWindow'> {
export class BasicContext
implements
Omit<
IPublicModelPluginContext,
'workspace' | 'commonUI' | 'command' | 'isPluginRegisteredInWorkspace' | 'editorWindow'
>
{
skeleton: IPublicApiSkeleton;
plugins: IPublicApiPlugins;
project: IPublicApiProject;
@ -82,7 +85,12 @@ export class BasicContext implements Omit<IPublicModelPluginContext, 'workspace'
preference: IPluginPreferenceMananger;
workspace: IWorkspace;
constructor(innerWorkspace: IWorkspace, viewName: string, readonly registerLevel: IPublicEnumPluginRegisterLevel, public editorWindow?: IEditorWindow) {
constructor(
innerWorkspace: IWorkspace,
viewName: string,
readonly registerLevel: IPublicEnumPluginRegisterLevel,
public editorWindow?: IEditorWindow,
) {
const editor = new Editor(viewName, true);
const innerSkeleton = new InnerSkeleton(editor, viewName);
@ -135,7 +143,11 @@ export class BasicContext implements Omit<IPublicModelPluginContext, 'workspace'
let plugins: IPublicApiPlugins;
const pluginContextApiAssembler: ILowCodePluginContextApiAssembler = {
assembleApis: (context: ILowCodePluginContextPrivate, pluginName: string, meta: IPublicTypePluginMeta) => {
assembleApis: (
context: ILowCodePluginContextPrivate,
pluginName: string,
meta: IPublicTypePluginMeta,
) => {
context.workspace = workspace;
context.hotkey = hotkey;
context.project = project;
@ -158,7 +170,8 @@ export class BasicContext implements Omit<IPublicModelPluginContext, 'workspace'
commandScope,
});
context.registerLevel = registerLevel;
context.isPluginRegisteredInWorkspace = registerLevel === IPublicEnumPluginRegisterLevel.Workspace;
context.isPluginRegisteredInWorkspace =
registerLevel === IPublicEnumPluginRegisterLevel.Workspace;
editor.set('pluginContext', context);
},
};
@ -175,4 +188,4 @@ export class BasicContext implements Omit<IPublicModelPluginContext, 'workspace'
await innerWorkspace?.registryInnerPlugin(designer, editor, plugins);
};
}
}
}

View File

@ -1,21 +0,0 @@
#!/usr/bin/env bash
DIR_NAME=$1
if [ -z $DIR_NAME ];then
echo 'Usage: ./create.sh <folder-name>'
exit 0
fi
if [ -d packages/$DIR_NAME ];then
echo 'Folder is existing!'
exit 0
fi
mkdir packages/$DIR_NAME
cp -r templates/* packages/$DIR_NAME
mv packages/$DIR_NAME/_tsconfig.json packages/$DIR_NAME/tsconfig.json
echo 'Add package successfully.'

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
rm -rf node_modules package-lock.json yarn.lock
npm i lerna@4.0.0
lerna clean -y
find ./packages -type f -name "package-lock.json" -exec rm -f {} \;
lerna bootstrap

View File

@ -1,7 +0,0 @@
#!/usr/bin/env bash
rm -rf package-lock.json yarn.lock
lerna clean -y
find ./packages -type f -name "package-lock.json" -exec rm -f {} \;
lerna bootstrap --force-local

View File

@ -1,5 +0,0 @@
#!/usr/bin/env bash
# FIXME! do not run build
lerna exec --scope @ali/lowcode-code-generator -- npm run build
# lerna exec --scope @ali/lowcode-demo-server -- npm start

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
pkgName="@alilc/lowcode-ignitor"
if [ "$1" ]; then
pkgName="$1"
fi
lerna exec --scope $pkgName -- npm start

View File

@ -1,17 +0,0 @@
#!/usr/bin/env bash
# sync all packages to alibaba intranet registry
tnpm sync @alilc/lowcode-types
tnpm sync @alilc/lowcode-utils
tnpm sync @alilc/lowcode-shell
tnpm sync @alilc/lowcode-editor-core
tnpm sync @alilc/lowcode-editor-skeleton
tnpm sync @alilc/lowcode-designer
tnpm sync @alilc/lowcode-plugin-designer
tnpm sync @alilc/lowcode-plugin-outline-pane
tnpm sync @alilc/lowcode-renderer-core
tnpm sync @alilc/lowcode-react-renderer
tnpm sync @alilc/lowcode-react-simulator-renderer
tnpm sync @alilc/lowcode-engine
tnpm sync @alilc/lowcode-workspace
tnpm sync @alilc/lowcode-plugin-command