Skip to content

Commit 4c41688

Browse files
author
xiejianxiong
committed
chore: init formily template
0 parents  commit 4c41688

File tree

219 files changed

+28360
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+28360
-0
lines changed

.codecov.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
threshold: 0.1%
6+
patch:
7+
default:
8+
threshold: 0.1%
9+
target: 95%

.editorconfig

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
indent_style = space
11+
indent_size = 2
12+
13+
[*.gradle]
14+
indent_size = 4

.eslintignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
node_modules
2+
lib
3+
dist
4+
build
5+
coverage
6+
expected
7+
website
8+
gh-pages
9+
weex
10+
build.ts
11+
esm
12+
doc-site
13+
public
14+
package

.eslintrc

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"env": {
3+
"node": true
4+
},
5+
"extends": [
6+
"plugin:vue/vue3-recommended",
7+
"plugin:@typescript-eslint/recommended",
8+
"prettier/@typescript-eslint"
9+
],
10+
"globals": {
11+
"sleep": true,
12+
"prettyFormat": true
13+
},
14+
"parserOptions": {
15+
"ecmaVersion": 10,
16+
"sourceType": "module",
17+
"ecmaFeatures": {
18+
"jsx": true
19+
}
20+
},
21+
"parser": "@typescript-eslint/parser",
22+
"plugins": ["@typescript-eslint", "prettier", "markdown"],
23+
"rules": {
24+
"@typescript-eslint/explicit-module-boundary-types": "off",
25+
"@typescript-eslint/no-var-requires": "off",
26+
"@typescript-eslint/no-explicit-any": "off",
27+
"@typescript-eslint/no-unused-vars": "error",
28+
"@typescript-eslint/ban-ts-comment": "off"
29+
},
30+
"overrides": [
31+
{
32+
"files": ["**/*.md"],
33+
"processor": "markdown/markdown"
34+
},
35+
{
36+
"files": ["**/*.md/*.{jsx,tsx}"],
37+
"rules": {
38+
"@typescript-eslint/no-unused-vars": "error",
39+
"no-unused-vars": "error",
40+
"no-console": "off"
41+
}
42+
},
43+
{
44+
"files": ["**/*.md/*.{js,ts}"],
45+
"rules": {
46+
"@typescript-eslint/no-unused-vars": "off",
47+
"no-unused-vars": "off",
48+
"no-console": "off"
49+
}
50+
}
51+
]
52+
}

.github/CONTRIBUTING.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing Guide
2+
3+
Hi! I’m really excited that you are interested in contributing to Formily. Before submitting your contribution though, please make sure to take a moment and read through the following guidelines.
4+
5+
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
6+
- [Pull Request Guidelines](#pull-request-guidelines)
7+
- [Git Commit Specific](./GIT_COMMIT_SPECIFIC.md)
8+
9+
## Issue Reporting Guidelines
10+
11+
- The issue list of this repo is **exclusively** for bug reports and feature requests. Non-conforming issues will be closed immediately.
12+
13+
- For simple beginner questions, you can get quick answers from
14+
15+
- For more complicated questions, you can use Google or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you!
16+
17+
- Try to search for your issue, it may have already been answered or even fixed in the development branch.
18+
19+
- Check if the issue is reproducible with the latest stable version of Formily. If you are using a pre-release, please indicate the specific version you are using.
20+
21+
- It is **required** that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.
22+
23+
- For bugs that involves build setups, you can create a reproduction repository with steps in the README.
24+
25+
- If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.
26+
27+
## Pull Request Guidelines
28+
29+
- Only code that's ready for release should be committed to the master branch. All development should be done in dedicated branches.
30+
- Checkout a **new** topic branch from master branch, and merge back against master branch.
31+
- Work in the `src` folder and **DO NOT** checkin `dist` in the commits.
32+
- Make sure `npm test` passes.
33+
- If adding new feature:
34+
- Add accompanying test case.
35+
- Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
36+
- If fixing a bug:
37+
- If you are resolving a special issue, add `(fix #xxxx[,#xxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
38+
- Provide detailed description of the bug in the PR. Live demo preferred.
39+
- Add appropriate test coverage if applicable.
40+
41+
## Git Commit Specific
42+
43+
- Your commits message must follow our [git commit specific](./GIT_COMMIT_SPECIFIC.md).
44+
- We will check your commit message, if it does not conform to the specification, the commit will be automatically refused, make sure you have read the specification above.
45+
- You could use `git cz` with a CLI interface to replace `git commit` command, it will help you to build a proper commit-message, see [commitizen](https://github.com/commitizen/cz-cli).
46+
- It's OK to have multiple small commits as you work on your branch - we will let GitHub automatically squash it before merging.

.github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: formily # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/ISSUE_TEMPLATE/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Create new issue
4+
url: https://formilyjs.org/guide/issue-helper
5+
about: The issue which is not created via https://formilyjs.org/guide/issue-helper will be closed immediately.
6+
- name: ✨ Question Answer / Idea
7+
url: https://github.com/alibaba/formily/discussions/new
8+
about: All questions can be solved here. At the same time you can provide all your ideas here.
9+
- name: 📖 View documentation
10+
url: https://formilyjs.org
11+
about: Official Formily documentation

.github/PULL_REQUEST_TEMPLATE.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
_Before_ submitting a pull request, please make sure the following is done...
2+
3+
- [ ] Ensure the pull request title and commit message follow the [Commit Specific](https://github.com/alibaba/formily/blob/formily_next/.github/GIT_COMMIT_SPECIFIC.md) in **English**.
4+
- [ ] Fork the repo and create your branch from `master` or `formily_next`.
5+
- [ ] If you've added code that should be tested, add tests!
6+
- [ ] If you've changed APIs, update the documentation.
7+
- [ ] Ensure the test suite passes (`npm test`).
8+
- [ ] Make sure your code lints (`npm run lint`) - we've done our best to make sure these rules match our internal linting guidelines.
9+
10+
**Please do not delete the above content**
11+
12+
---
13+
14+
## What have you changed?

.github/workflows/check-pr-title.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check PR title
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- reopened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: aslafy-z/conventional-pr-title-action@master
15+
with:
16+
preset: conventional-changelog-angular@^5.0.6
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
if: contains(github.event.head_commit.message, 'chore(versions)') == false
15+
strategy:
16+
matrix:
17+
node_version: [10.x, 11.x]
18+
os: [ubuntu-latest]
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Use Node.js ${{ matrix.node_version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node_version }}
25+
26+
- run: yarn -v
27+
- run: yarn --ignore-engines
28+
- name: ESlint
29+
uses: reviewdog/action-eslint@v1
30+
with:
31+
reporter: github-check
32+
eslint_flags: '.'
33+
- run: yarn build
34+
- run: yarn test:prod
35+
env:
36+
CI: true
37+
HEADLESS: false
38+
PROGRESS: none
39+
NODE_ENV: test
40+
NODE_OPTIONS: --max_old_space_size=4096
41+
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v1
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
fail_ci_if_error: true
47+
verbose: true

.github/workflows/commitlint.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Check Commit spec
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the formily_next branch
8+
push:
9+
branches: [master]
10+
pull_request:
11+
branches: [master]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
commitlint:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
with:
28+
fetch-depth: 0=
29+
- uses: wagoid/commitlint-github-action@v3
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Issue Open Check
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
check-issue:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions-cool/[email protected]
12+
id: checkUser
13+
with:
14+
require: 'write'
15+
16+
- name: check invalid
17+
if: (contains(github.event.issue.body, 'formily-issue-helper') == false) && (steps.checkUser.outputs.result == 'false')
18+
uses: actions-cool/[email protected]
19+
with:
20+
actions: 'create-comment,add-labels,close-issue'
21+
issue-number: ${{ github.event.issue.number }}
22+
labels: 'Invalid'
23+
body: |
24+
Hello @${{ github.event.issue.user.login }}, your issue has been closed because it does not conform to our issue requirements. Please use the [Issue Helper](https://formilyjs.org/guide/issue-helper) to create an issue, thank you!
25+
你好 @${{ github.event.issue.user.login }},为了能够进行高效沟通,我们对 issue 有一定的格式要求,你的 issue 因为不符合要求而被自动关闭。你可以通过 [issue 助手](https://formilyjs.org/guide/issue-helper) 来创建 issue 以方便我们定位错误。谢谢配合!

.github/workflows/package-size.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Compressed Size
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: preactjs/compressed-size-action@v2
12+
with:
13+
repo-token: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/pr-welcome.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: PR Welcome
2+
3+
on:
4+
pull_request_target:
5+
types: [opened]
6+
7+
jobs:
8+
welcome:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions-cool/[email protected]
12+
with:
13+
pr-emoji: '+1, heart'

.github/workflows/release.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- formily_next
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
if: contains(github.event.head_commit.message, 'chore(release)')
11+
steps:
12+
- uses: actions/checkout@v1
13+
with:
14+
fetch-depth: 0
15+
- uses: actions/setup-node@v1
16+
with:
17+
node-version: 12
18+
registry-url: https://registry.npmjs.org/
19+
- run: |
20+
yarn -v
21+
yarn --ignore-engines
22+
yarn build
23+
yarn test:prod
24+
env:
25+
NODE_OPTIONS: --max_old_space_size=4096
26+
REGISTRY: https://registry.npmjs.org
27+
- uses: janrywang/github-tag-release@main
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
- run: yarn run release
31+
env:
32+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
35+
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }}
36+
- name: Upload coverage to Codecov
37+
uses: codecov/codecov-action@v1
38+
with:
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
fail_ci_if_error: true
41+
verbose: true

0 commit comments

Comments
 (0)