From 6a4de499a42c55cb793bebb5e40cdd078aa94ad3 Mon Sep 17 00:00:00 2001 From: wenmine Date: Thu, 23 Nov 2023 19:20:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0eslint&=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96=E6=9E=84=E5=BB=BA=20(#101)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 2 + .github/PULL_REQUEST_TEMPLATE.md | 15 +++- .../PULL_REQUEST_TEMPLATE.zh-CN.md | 52 ++++++++++++ .github/workflows/push-check.yml | 36 ++++++++ CONTRIBUTING.md | 9 +- CONTRIBUTING.zh-CN.md | 17 ++-- README.en-US.md | 84 ------------------- 7 files changed, 112 insertions(+), 103 deletions(-) create mode 100644 .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md create mode 100644 .github/workflows/push-check.yml delete mode 100644 README.en-US.md diff --git a/.eslintignore b/.eslintignore index a5f9925..997d732 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,3 +5,5 @@ package-lock.json **/node_modules/** tmp temp +mockServer +packages/vue-generator/**/output/** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 74fb168..f4e2f22 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,5 @@ +English | [简体中文](https://github.com/opentiny/tiny-engine/blob/develop/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md) + # PR ## PR Checklist @@ -7,6 +9,7 @@ Please check if your PR fulfills the following requirements: - [ ] The commit message follows our [Commit Message Guidelines](https://github.com/opentiny/tiny-engine/blob/develop/CONTRIBUTING.md) - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) +- [ ] Built its own designer, fully self-validated ## PR Type @@ -23,13 +26,21 @@ What kind of change does this PR introduce? - [ ] Documentation content changes - [ ] Other... Please describe: -## What is the current behavior? +## Background and solution + + +### What is the current behavior? Issue Number: N/A -## What is the new behavior? +### What is the new behavior? + ## Does this PR introduce a breaking change? diff --git a/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md new file mode 100644 index 0000000..6ceff4d --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md @@ -0,0 +1,52 @@ +[English](https://github.com/opentiny/tiny-engine/blob/develop/.github/PULL_REQUEST_TEMPLATE.md) | 简体中文 + +# PR + +## PR Checklist + +请检查您的 PR 是否满足以下要求: + +- [ ] commit message遵循我们的[提交贡献指南](https://github.com/opentiny/tiny-engine/blob/develop/CONTRIBUTING.md) +- [ ] 添加了更改内容的测试用例(用于bugfix/功能) +- [ ] 文档已添加/更新(用于bugfix/功能) +- [ ] 是否构建了自己的设计器,经过了充分的自验证 + +## PR 类型 + +这个PR的类型是? + +- [ ] 日常 bug 修复 +- [ ] 新特性支持 +- [ ] 代码风格优化 +- [ ] 重构 +- [ ] 构建优化 +- [ ] 测试用例 +- [ ] 文档更新 +- [ ] 分支合并 +- [ ] 其他改动(请补充) + + +## 需求背景和解决方案 + + + + +Issue Number: N/A + +### 修改前 + + +### 修改后 + +## 此PR是否含有 breaking change? + +- [ ] 是 +- [ ] 否 + + + +## Other information diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml new file mode 100644 index 0000000..7f0d4ed --- /dev/null +++ b/.github/workflows/push-check.yml @@ -0,0 +1,36 @@ +name: Push And Create PR Check + +on: + push: + branches: [] + pull_request: + branches: [develop,main] + +jobs: + push-check: + runs-on: ubuntu-latest # windows-latest || macos-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 16 + + - name: Install pnpm + run: npm i -g pnpm + + - name: Install dependencies + run: pnpm i + + - name: Get changed files + id: get_changed_files + uses: tj-actions/changed-files@v40 + with: + files: | + **.js + **.vue + **.jsx + - name: Run ESLint + run: npx eslint ${{steps.get_changed_files.outputs.all_changed_files}} + - name: Run Build + run: pnpm run build:plugin && pnpm run build:alpha diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4a462f4..3070a8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -51,14 +51,11 @@ Local startup steps: git clone git@github.com:username/tiny-engine.git cd tiny-engine git remote add upstream git@github.com:opentiny/tiny-engine.git -npm i +pnpm i # Start the project. -$ npm run serve +$ pnpm dev -# start another terminal -$ cd mockServer -$ npm run dev ``` To submit a PR: @@ -67,7 +64,7 @@ To submit a PR: - Local coding. - Submit according to [Commit Message Format](https://www.conventionalcommits.org/zh-hans/v1.0.0/) specification. PR that do not conform to the submission specification will not be merged. - Submit to remote repository: `git push origin branchName`. -- (Optional) Synchronize upstream repository dev branch latest code: `git pull upstream dev`. +- (Optional) Synchronize upstream repository dev branch latest code: `git pull upstream develop`. - Open the [Pull requests](https://github.com/opentiny/tiny-engine/pulls) link of the TinyEngine code repository and click the New pull request button to submit the PR. - Project Committer conducts Code Review and makes comments. - The PR author adjusts the code according to the opinion. Please note that when a branch initiates PR, the subsequent commit will be synchronized automatically, and there is no need to resubmit the PR. diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.md index 171f91b..6729ec5 100644 --- a/CONTRIBUTING.zh-CN.md +++ b/CONTRIBUTING.zh-CN.md @@ -42,23 +42,18 @@ - 点击 [TinyEngine](https://github.com/opentiny/tiny-engine) 代码仓库右上角的 Fork 按钮,将上游仓库 Fork 到个人仓库 - Clone 个人仓库到本地 -- 在 TinyEngine 根目录下运行 `npm install`, 安装依赖 -- 在 TinyEngine mockServer 运行 `npm install`, 安装依赖 -- 在 TinyEngine 根目录下运行 `npm run serve`,再到 mockServer 目录下运行 `npm run dev`,启动本地开发 +- 在 TinyEngine 根目录下运行 `pnpm i`, 安装依赖 +- 在 TinyEngine 根目录下运行 `pnpm dev`,启动本地开发 ```shell # username 为用户名,执行前请替换 git clone git@github.com:username/tiny-engine.git cd tiny-engine git remote add upstream git@github.com:opentiny/tiny-engine.git -npm i +pnpm i # 启动项目 -$ npm run serve - -# start another terminal -$ cd mockServer -$ npm run dev +$ pnpm dev ``` @@ -68,7 +63,7 @@ $ npm run dev - 本地编码 - 遵循 Commit Message Format 规范进行提交,不符合提交规范的 PR 将不会被合并 - 提交到远程仓库:git push origin branchName -- (可选)同步上游仓库 dev 分支最新代码:git pull upstream dev +- (可选)同步上游仓库 develop 分支最新代码:git pull upstream develop - 打开 TinyEngine 代码仓库的 [Pull requests](https://github.com/opentiny/tiny-engine/pulls) 链接,点击 New pull request 按钮提交 PR - 项目 Committer 进行 Code Review,并提出意见 - PR 作者根据意见调整代码,请注意一个分支发起了 PR 后,后续的 commit 会自动同步,无需重新提交 PR @@ -81,4 +76,4 @@ $ npm run dev 如果你对我们的开源项目感兴趣,欢迎通过以下方式加入我们的开源社区。 - 添加官方小助手微信:opentiny-official,加入我们的技术交流群 -- 加入邮件列表:opentiny@googlegroups.com +- 加入邮件列表:opentiny@googlegroups.com \ No newline at end of file diff --git a/README.en-US.md b/README.en-US.md deleted file mode 100644 index 90d6690..0000000 --- a/README.en-US.md +++ /dev/null @@ -1,84 +0,0 @@ -

- - OpenTiny Logo - -

- -

TinyEngine enables developers to customize low-code platforms, build low-bit platforms online in real time, and support secondary development or integration of low-bit platform capabilities.

- -English | [简体中文](README.zh-CN.md) - -🌈 Features: - -- Cross-end cross-frame front-end components -- Supports online real-time construction, secondary development, or being integrated. -- Directly generate deployable source code without engine support. -- Allows access to third-party components and customized extension plug-ins. -- Supports high-code and low-code, and hybrid development and deployment of applications. -- The platform accesses AI big model capabilities to help developers build applications. - -## Documentation - -- intro:https://opentiny.design/tiny-engine#/home -- tutorial:https://opentiny.design/tiny-engine#/help-center/course/engine -- playground:https://opentiny.design/tiny-engine#/tiny-engine-editor - -## Development - -### Dependencies required for installation - -```sh -$ pnpm install -``` - -### Local development: Start the local mock server and use the mock data of the local mock server. - -```sh -$ pnpm dev -``` - -Open a browser: `http://localhost:8080/?type=app&id=918&tenant=1&pageid=NTJ4MjvqoVj8OVsc` -`url search` Parameters: - -- `type=app` Application type -- `id=xxx` Application ID -- `tenant=xxx` Organization ID -- `pageid=xxx` Page ID - -## Build - -```sh -# Build all plug-ins first -pnpm build:plugin - -# Build Designer -pnpm build:alpha or build:prod - -``` - -## Milestones - -```mermaid -gantt -dateFormat YYYY-MM-DD -axisFormat %Y-%m-%d - - 1.0.0-beta.x version :active,2023-09-25, 2024-03-31 - 1.0.0-rc version : 2024-04-01, 2024-06-30 - 1.0.0 version : 2024-07-01, 2024-07-31 - -``` - - -## 🤝 Participation and Contribution - -If you are interested in our open source project, please join us! 🎉 - -Please read the [Contribution Guide](CONTRIBUTING.md) before participating in the contribution. - -- Add official assistant WeChat opentiny-official and join the technical exchange group -- Join the mailing list opentiny@googlegroups.com - -## License - -[MIT](LICENSE)