Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit6ca6870

Browse files
committed
chore clean up (#755)
* chore(i18n): rm old lang settings, generators .. etc* ci(travis): update node runtime vertion to latest-12.18.0* refactor: update pkgs & rm unnecessory eslint & more
1 parent7196d5c commit6ca6870

39 files changed

+11349
-16438
lines changed

‎.babelrc‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"preset-env": {
1313
"useBuiltIns":"usage",
14-
"corejs":"3.2.1",
14+
"corejs":"3.6.5",
1515
"targets":"> 0.25%, not dead",
1616
"debug":false
1717
}
@@ -39,28 +39,6 @@
3939
"displayName":true,
4040
"preprocess":false
4141
}
42-
],
43-
[
44-
"module-resolver",
45-
{
46-
"root": ["./"],
47-
"alias": {
48-
"@/containers":"./src/containers",
49-
"@/components":"./src/components",
50-
"@/services":"./src/services",
51-
"@/constant":"./utils/constant/",
52-
"@/hooks":"./src/hooks",
53-
"@/hoc":"./src/hoc",
54-
"@/config":"./config",
55-
"@/stores":"./src/stores",
56-
"@/model":"./src/stores/SharedModel",
57-
"@/utils":"./utils",
58-
"@/schemas":"./src/schemas",
59-
"@/Img":"./src/components/Img",
60-
"@/SvgIcons":"./src/components/SvgIcons",
61-
"@/i18n":"./i18n"
62-
}
63-
}
6442
]
6543
]
6644
}

‎.eslintrc.js‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,30 @@
22
// https://github.com/groupher/eslint-config-web/blob/master/index.js
33
module.exports={
44
extends:['@groupher/eslint-config-web'],
5+
settings:{
6+
'import/resolver':{
7+
'babel-module':{},
8+
'eslint-import-resolver-custom-alias':{
9+
alias:{
10+
'@/config':'config',
11+
'@/containers':'src/containers',
12+
'@/components':'src/components',
13+
'@/services':'src/services',
14+
'@/constant':'utils/constant',
15+
'@/hooks':'src/hooks',
16+
'@/hoc':'src/hoc',
17+
'@/config':'config',
18+
'@/stores':'src/stores',
19+
'@/model':'src/stores/SharedModel',
20+
'@/utils':'utils',
21+
'@/schemas':'src/schemas',
22+
'@/Img':'src/components/Img',
23+
'@/SvgIcons':'src/components/SvgIcons',
24+
'@/i18n':'i18n',
25+
},
26+
extensions:['.js','.jsx'],
27+
},
28+
},
29+
},
30+
rules:{},
531
}

‎.gitignore‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ node_modules/
33
npm-debug.log
44
build
55

6-
lang/.messages/
76
coverage/
87
.coveralls.yml
98
yarn-error.log

‎.travis.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ script:
3434
-chmod +x ./utils/bin/jq-linux
3535
-./utils/bin/jq-linux -s '.[0] * .[1]' config/config.json config/config.ci.json > /tmp/config.json
3636
-cp /tmp/config.json ./config/config.json
37-
-nvm exec 12.11.1 npm run build.ci
38-
-nvm exec 12.11.1 npm run test:ci
37+
-nvm exec 12.18.0 npm run build.ci
38+
-nvm exec 12.18.0 npm run test:ci
3939

4040
cache:
4141
directories:

‎config/index.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// import * as CONFIG from './config.json'
33

44
export{defaultasLABEL_POOL}from'./label_pool'
5+
export{defaultasSEO}from'./next_seo'
56

67
// explicit export to avoid eslint warning
78
export{

‎deploy/dev/packer.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414
mkdir"${PACKER_TMP_DIR}"
1515

1616
echo"[Step 2/${TOTAL_STEPS}] cp files to${PACKER_TMP_DIR} ..."
17-
cp -rf pageslangsrc config static utils .babelrc next-seo.config.js server.js"${PACKER_TMP_DIR}"
17+
cp -rf pages src config static utils .babelrc next-seo.config.js server.js"${PACKER_TMP_DIR}"
1818
cp Makefile Makefile.include.mk"${PACKER_TMP_DIR}"
1919
cp package.docker.json"${PACKER_TMP_DIR}/package.json"
2020
cp next.config.docker.js"${PACKER_TMP_DIR}/next.config.js"

‎deploy/production/packer.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fi
1414
mkdir"${PACKER_TMP_DIR}"
1515

1616
echo"[Step 2/${TOTAL_STEPS}] cp files to${PACKER_TMP_DIR} ..."
17-
cp -rf pageslangsrc config static utils .babelrc next-seo.config.js server.js"${PACKER_TMP_DIR}"
17+
cp -rf pages src config static utils .babelrc next-seo.config.js server.js"${PACKER_TMP_DIR}"
1818
cp Makefile Makefile.include.mk"${PACKER_TMP_DIR}"
1919
cp package.docker.json"${PACKER_TMP_DIR}/package.json"
2020
cp next.config.docker.js"${PACKER_TMP_DIR}/next.config.js"

‎docs/architecture/convention.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Import R from 'ramda'
9999

100100
// 2. import utils
101101
Import {
102+
SR71,
102103
  asyncRes,
103104
  asyncErr,
104105
  buildLog,
@@ -110,8 +111,6 @@ Import {
110111
  THREAD,
111112
} from'@/utils'
112113

113-
// 3. import aysnc mudule
114-
ImportSR71 from'@/utils/async/sr71'
115114
// 4. import graphql schema
116115
ImportS from'./schema'
117116

‎docs/architecture/convention.zh-CN.md‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ const log = buildLog('C:PostsThread')
9595
```js
9696
// 2. import utils
9797
import {
98+
SR71,
9899
asyncRes,
99100
asyncErr,
100101
buildLog,
@@ -106,8 +107,6 @@ import {
106107
THREAD,
107108
}from'@/utils'
108109

109-
// 3. import aysnc mudule
110-
importSR71from'@/utils/async/sr71'
111110
// 4. import graphql schema
112111
importSfrom'./schema'
113112

‎docs/architecture/intro.md‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ after combining the actual needs of the community and referring to various excel
2020
├── deploy // docker related
2121
│   ├── dev
2222
│   └── production
23-
├── lang // i18n support
24-
│    ├── .messages
25-
│   ├── en.json
26-
│   └── zh.json
2723
├── pages // app route files
2824
│   ├── _app.js
2925
│   ├── _document.js
@@ -135,7 +131,6 @@ A simple Container component is structured as follows:
135131
```js
136132
├──Editor.js// sub component
137133
├──index.js// entry for current container
138-
├──lang.js// i18n messages
139134
├──logic.js// all the logic belongs to this cotainer
140135
├──schema.js// GraphQL schema
141136
├──store.js// state management
@@ -261,10 +256,9 @@ Although it is OK, I think the logic does not belong to the `view` layer, and th
261256
```js
262257
import {merge }from'ramda'
263258

264-
import {asyncRes,asyncErr, $solver }from'@/utils'
259+
import {SR71,asyncRes,asyncErr, $solver }from'@/utils'
265260

266261
import {S,updatablePostFields }from'./schema'
267-
importSR71from'@/utils/async/sr71'
268262

269263
constsr71$=newSR71()
270264

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp