Skip to content

Commit e2eba28

Browse files
authored
Merge pull request #102 from react-component/3.x
3.0
2 parents 020a22f + edb8aa2 commit e2eba28

File tree

160 files changed

+3390
-5764
lines changed

Some content is hidden

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

160 files changed

+3390
-5764
lines changed

.editorconfig

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
# top-most EditorConfig file
1+
# http://editorconfig.org
22
root = true
33

4-
# Unix-style newlines with a newline ending every file
5-
[*.{js,css}]
6-
end_of_line = lf
7-
insert_final_newline = true
4+
[*]
85
indent_style = space
96
indent_size = 2
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false
14+
15+
[Makefile]
16+
indent_style = tab

.eslintrc.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const base = require('@umijs/fabric/dist/eslint');
2+
3+
module.exports = {
4+
...base,
5+
rules: {
6+
...base.rules,
7+
'import/no-extraneous-dependencies': 0,
8+
'import/no-named-as-default': 0,
9+
'no-template-curly-in-string': 0,
10+
'prefer-promise-reject-errors': 0,
11+
'react/no-array-index-key': 0,
12+
'react/require-default-props': 0,
13+
'react/sort-comp': 0,
14+
'react/no-find-dom-node': 1,
15+
'@typescript-eslint/no-explicit-any': 0,
16+
'jsx-a11y/label-has-associated-control': 0,
17+
'jsx-a11y/label-has-for': 0,
18+
'no-param-reassign': 0,
19+
'prefer-destructuring': 0,
20+
},
21+
};

.fatherrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
export default {
3+
cjs: 'babel',
4+
esm: { type: 'babel', importLibToEs: true },
5+
runtimeHelpers: true,
6+
preCommit: {
7+
eslint: true,
8+
prettier: true,
9+
},
10+
};

.github/workflows/main.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, 3.0]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
setup:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@master
15+
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: '12'
19+
20+
- name: cache package-lock.json
21+
uses: actions/cache@v2
22+
with:
23+
path: package-temp-dir
24+
key: lock-${{ github.sha }}
25+
26+
- name: create package-lock.json
27+
run: npm i --package-lock-only
28+
29+
- name: hack for singe file
30+
run: |
31+
if [ ! -d "package-temp-dir" ]; then
32+
mkdir package-temp-dir
33+
fi
34+
cp package-lock.json package-temp-dir
35+
- name: cache node_modules
36+
id: node_modules_cache_id
37+
uses: actions/cache@v2
38+
with:
39+
path: node_modules
40+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
41+
42+
- name: install
43+
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
44+
run: npm ci
45+
46+
lint:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: checkout
50+
uses: actions/checkout@master
51+
52+
- name: restore cache from package-lock.json
53+
uses: actions/cache@v2
54+
with:
55+
path: package-temp-dir
56+
key: lock-${{ github.sha }}
57+
58+
- name: restore cache from node_modules
59+
uses: actions/cache@v2
60+
with:
61+
path: node_modules
62+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
63+
64+
- name: lint
65+
run: npm run lint
66+
67+
needs: setup
68+
69+
compile:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: checkout
73+
uses: actions/checkout@master
74+
75+
- name: restore cache from package-lock.json
76+
uses: actions/cache@v2
77+
with:
78+
path: package-temp-dir
79+
key: lock-${{ github.sha }}
80+
81+
- name: restore cache from node_modules
82+
uses: actions/cache@v2
83+
with:
84+
path: node_modules
85+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
86+
87+
- name: compile
88+
run: npm run compile
89+
90+
needs: setup
91+
92+
coverage:
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: checkout
96+
uses: actions/checkout@master
97+
98+
- name: restore cache from package-lock.json
99+
uses: actions/cache@v2
100+
with:
101+
path: package-temp-dir
102+
key: lock-${{ github.sha }}
103+
104+
- name: restore cache from node_modules
105+
uses: actions/cache@v2
106+
with:
107+
path: node_modules
108+
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
109+
110+
- name: coverage
111+
run: npm test -- --coverage && bash <(curl -s https://codecov.io/bash)
112+
113+
needs: setup

.gitignore

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
.storybook
12
*.iml
23
*.log
3-
.idea
4+
.idea/
45
.ipr
56
.iws
67
*~
@@ -12,16 +13,33 @@
1213
Thumbs.db
1314
.project
1415
.*proj
15-
.svn
16+
.svn/
1617
*.swp
1718
*.swo
1819
*.pyc
1920
*.pyo
21+
.build
2022
node_modules
2123
.cache
22-
*.css
24+
dist
25+
assets/**/*.css
2326
build
2427
lib
28+
es
2529
coverage
26-
dist
27-
es
30+
yarn.lock
31+
package-lock.json
32+
.vscode
33+
.doc
34+
# production
35+
/dist
36+
/docs-dist
37+
38+
# misc
39+
.DS_Store
40+
# umi
41+
.umi
42+
.umi-production
43+
.umi-test
44+
.env.local
45+
src/.umi

.jshintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.jshintrc

Lines changed: 0 additions & 10 deletions
This file was deleted.

.npmignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
build/
2+
*.cfg
3+
nohup.out
4+
*.iml
5+
.idea/
6+
.ipr
7+
.iws
8+
*~
9+
~*
10+
*.diff
11+
*.log
12+
*.patch
13+
*.bak
14+
.DS_Store
15+
Thumbs.db
16+
.project
17+
.*proj
18+
.svn/
19+
*.swp
20+
out/
21+
.build
22+
node_modules
23+
.cache
24+
examples
25+
tests
26+
src
27+
/index.js
28+
.*
29+
assets/**/*.less

.prettierignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**/*.svg
2+
**/*.ejs
3+
**/*.html
4+
package.json
5+
.umi
6+
.umi-production
7+
.umi-test

.travis.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)