Skip to content

Commit 2aa5760

Browse files
committed
🔖 react app
1 parent 52094ec commit 2aa5760

71 files changed

Lines changed: 3044 additions & 0 deletions

Some content is hidden

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

demos/reactapp/.babelrc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"presets": [
3+
[
4+
"env",
5+
{
6+
"modules": false
7+
}
8+
],
9+
"react",
10+
"stage-0"
11+
],
12+
"plugins": [
13+
"react-hot-loader/babel",
14+
"syntax-dynamic-import",
15+
"transform-runtime",
16+
[
17+
"import",
18+
[
19+
{
20+
"libraryName": "antd",
21+
"style": "css"
22+
}
23+
]
24+
]
25+
],
26+
"env": {
27+
"test": {
28+
"presets": [
29+
"env",
30+
"react",
31+
"stage-0"
32+
]
33+
}
34+
}
35+
}

demos/reactapp/.editorconfig

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# http://editorconfig.org
4+
# 所有文件换行以 Unix like 风格(LF),win 格式特定的除外(bat)
5+
# 缩进 java 4 个空格,其他所有文件 2 个空格
6+
7+
root = true
8+
9+
[*]
10+
# Unix-style newlines with a newline ending every file
11+
end_of_line = lf
12+
13+
# Change these settings to your own preference
14+
indent_style = space
15+
indent_size = 2
16+
17+
# We recommend you to keep these unchanged
18+
charset = utf-8
19+
trim_trailing_whitespace = true
20+
insert_final_newline = true
21+
22+
[*.bat]
23+
end_of_line = crlf
24+
25+
[*.java]
26+
indent_style = space
27+
indent_size = 4
28+
29+
[*.md]
30+
trim_trailing_whitespace = false

demos/reactapp/.eslintrc

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
{
2+
"extends": [
3+
"eslint-config-airbnb"
4+
],
5+
"parser": "babel-eslint",
6+
"globals": {
7+
"Action": false,
8+
"__DEV__": false,
9+
"__DEV__LOG__": false,
10+
"__DEV__LOG__DIFF__": true,
11+
"__DEV__IMMUTABLE_CHECK__": false,
12+
"__PROD__": false,
13+
"__DEBUG__": false,
14+
"__DEBUG_NEW_WINDOW__": false,
15+
"__BASENAME__": false,
16+
"Image": {},
17+
"FileReader": {},
18+
"Request": {},
19+
"fetch": {},
20+
"XMLHttpRequest": {}
21+
},
22+
"rules": {
23+
"arrow-body-style": [
24+
"off"
25+
],
26+
"global-require": [
27+
"warn"
28+
],
29+
"no-underscore-dangle": [
30+
"off"
31+
],
32+
"no-case-declarations": [
33+
"warn"
34+
],
35+
"max-len": [
36+
"warn",
37+
120,
38+
{
39+
"ignoreUrls": true
40+
}
41+
],
42+
"no-unused-vars": [
43+
"warn"
44+
],
45+
"no-nested-ternary": [
46+
"warn"
47+
],
48+
"no-class-assign": [
49+
"off"
50+
],
51+
"no-use-before-define": [
52+
"error",
53+
{
54+
"functions": false,
55+
"classes": true
56+
}
57+
],
58+
"new-cap": [
59+
"error",
60+
{
61+
"capIsNewExceptions": [
62+
"List",
63+
"Map",
64+
"OrderedMap",
65+
"Set",
66+
"OrderedSet",
67+
"Stack",
68+
"Range",
69+
"Repeat",
70+
"Record",
71+
"Seq"
72+
]
73+
}
74+
],
75+
"linebreak-style": [
76+
"off"
77+
],
78+
"import/prefer-default-export": [
79+
"off"
80+
],
81+
"react/prefer-stateless-function": [
82+
"off"
83+
],
84+
"react/jsx-curly-spacing": [
85+
"off"
86+
],
87+
"react/forbid-prop-types": [
88+
"off"
89+
],
90+
"react/no-unused-prop-types": [
91+
"warn"
92+
]
93+
}
94+
}

demos/reactapp/.gitattributes

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
* text=auto eol=lf
2+
3+
# plan text
4+
*.txt text
5+
*.java text
6+
*.scala text
7+
*.groovy text
8+
*.gradle text
9+
*.xml text
10+
*.xsd text
11+
*.tld text
12+
*.yaml text
13+
*.yml text
14+
*.wsdd text
15+
*.wsdl text
16+
*.jsp text
17+
*.jspf text
18+
*.js text
19+
*.jsx text
20+
*.json text
21+
*.css text
22+
*.less text
23+
*.sql text
24+
*.properties text
25+
26+
# unix style
27+
*.sh text eol=lf
28+
29+
# win style
30+
*.bat text eol=crlf
31+
32+
# don't handle
33+
*.der -text
34+
*.jks -text
35+
*.pfx -text
36+
*.map -text
37+
*.patch -text
38+
*.dat -text
39+
*.data -text
40+
*.db -text
41+
42+
# binary
43+
*.jar binary
44+
*.war binary
45+
*.zip binary
46+
*.tar binary
47+
*.tar.gz binary
48+
*.gz binary
49+
*.apk binary
50+
*.bin binary
51+
*.exe binary
52+
53+
# 图片
54+
*.png binary
55+
*.jpg binary
56+
*.ico binary
57+
*.gif binary
58+
59+
# 音视频
60+
*.mp3 binary
61+
*.swf binary
62+
63+
# other doc
64+
*.pdf binary
65+
*.doc binary
66+
*.docx binary
67+
*.xls binary
68+
*.xlsx binary

demos/reactapp/.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# project
2+
node_modules
3+
4+
# build
5+
dist/
6+
coverage
7+
8+
# IDE files
9+
.idea/
10+
*.iml
11+
.ipr
12+
.iws
13+
14+
# temp and sys
15+
*~
16+
~*
17+
*.diff
18+
*.patch
19+
*.bak
20+
.DS_Store
21+
Thumbs.db
22+
*.log
23+
24+
# other
25+
.project
26+
.*proj
27+
.svn/
28+
*.swp
29+
*.swo
30+
*.pyc
31+
*.pyo
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* @file app 的全局配置
3+
* @author Zhang Peng
4+
*/
5+
6+
module.exports = {
7+
8+
/**
9+
* 打印日志开关
10+
*/
11+
log: true,
12+
13+
http: {
14+
15+
/**
16+
* 请求超时时间
17+
*/
18+
timeout: 5000,
19+
20+
/**
21+
* 服务器的host
22+
*/
23+
baseURL: 'http://localhost:8080/api',
24+
}
25+
};

0 commit comments

Comments
 (0)