Skip to content

Commit

Permalink
添加eslint&自动化构建 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenmine authored Nov 23, 2023
1 parent 6de244f commit 6a4de49
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 103 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ package-lock.json
**/node_modules/**
tmp
temp
mockServer
packages/vue-generator/**/output/**
15 changes: 13 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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
<!--
1. Describe the problem and the scenario.
2. New features need to be described and attached with renderings.
3. Screenshots or GIFs involving UI/Interaction changes/Bugfix before and after modification are required.
-->

### What is the current behavior?

<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. -->

Issue Number: N/A

## What is the new behavior?
### What is the new behavior?


## Does this PR introduce a breaking change?

Expand Down
52 changes: 52 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.zh-CN.md
Original file line number Diff line number Diff line change
@@ -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 修复
- [ ] 新特性支持
- [ ] 代码风格优化
- [ ] 重构
- [ ] 构建优化
- [ ] 测试用例
- [ ] 文档更新
- [ ] 分支合并
- [ ] 其他改动(请补充)


## 需求背景和解决方案

<!--
1. 要解决的具体问题。
2. 新增特性,需要进行功能描述,并附上效果图。
3. 涉及UI/交互变动/Bugfix需要有修改前&修改后截图或 GIF。
-->


Issue Number: N/A

### 修改前


### 修改后

## 此PR是否含有 breaking change?

- [ ]
- [ ]

<!-- 如果此 PR 包含breaking change,请在下面从用户角度描述具体变化和其他风险。-->

## Other information
36 changes: 36 additions & 0 deletions .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 3 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,11 @@ Local startup steps:
git clone [email protected]:username/tiny-engine.git
cd tiny-engine
git remote add upstream [email protected]: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:
Expand All @@ -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.
Expand Down
17 changes: 6 additions & 11 deletions CONTRIBUTING.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]:username/tiny-engine.git
cd tiny-engine
git remote add upstream [email protected]:opentiny/tiny-engine.git
npm i
pnpm i

# 启动项目
$ npm run serve

# start another terminal
$ cd mockServer
$ npm run dev
$ pnpm dev

```

Expand All @@ -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
Expand All @@ -81,4 +76,4 @@ $ npm run dev
如果你对我们的开源项目感兴趣,欢迎通过以下方式加入我们的开源社区。

- 添加官方小助手微信:opentiny-official,加入我们的技术交流群
- 加入邮件列表:[email protected]
- 加入邮件列表:[email protected]
84 changes: 0 additions & 84 deletions README.en-US.md

This file was deleted.

0 comments on commit 6a4de49

Please sign in to comment.