Skip to content

Commit

Permalink
Merge pull request #36 from ZJU-CC98/dev
Browse files Browse the repository at this point in the history
release: v1.5.6-beta
  • Loading branch information
Deturium authored Mar 11, 2019
2 parents bfc7ffd + fdba80d commit 3d124b2
Show file tree
Hide file tree
Showing 137 changed files with 3,520 additions and 3,319 deletions.
3 changes: 0 additions & 3 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Browsers that we support

ios 10.3
Android > 67

last 2 version
> 1% in CN

Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/config/**
/dist/**
47 changes: 47 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = {
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
},
"useJSXTextNode": true,
"project": "./tsconfig.json",
},

// 以当前目录为根目录,不再向上查找 .eslintrc.js
root: true,

plugins: [
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
"@typescript-eslint",
"react-hooks",
],

extends: [
"eslint:recommended",
// https://alloyteam.github.io/eslint-config-alloy/
"eslint-config-alloy",
"plugin:@typescript-eslint/recommended",
// https://github.com/prettier/eslint-config-prettier
"prettier",
"prettier/@typescript-eslint",
],

rules: {
"@typescript-eslint/camelcase": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/explicit-member-accessibility": 0,
"@typescript-eslint/interface-name-prefix": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-object-literal-type-assertion": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-use-before-define": 0,

"handle-callback-err": 0,
"max-nested-callbacks": 0,
"no-fallthrough": 0,
"no-undefined": 0,
}
}
11 changes: 11 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const tasks = arr => arr.join(' && ')

module.exports = {
"hooks": {
"pre-commit": tasks([
"npm run type-check",
"npm run lint",
"lint-staged",
]),
}
}
6 changes: 0 additions & 6 deletions .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
"trailingComma": "es5",
"semi": false,
"singleQuote": true,
"printWidth": 100
}
37 changes: 17 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@

### 项目技术栈

- react@next
- react@16.8

- @reach/router

-@material-ui/core@3
-@material-ui@4

- styled-component@4

- webpack@4

- typescript



### 知识库
Expand Down Expand Up @@ -78,7 +80,7 @@ module.exports = {
<img width="150" height="150" src="https://github.com/Deturium.png?s=150">
<br>
<a href="https://github.com/Deturium">Deturium</a>
<p>前项目背锅人</p>
<p>项目背锅人</p>
<p>小氢气</p>
</td>
<td align="center" valign="top">
Expand All @@ -95,22 +97,6 @@ module.exports = {
<p>高级 Webpack 配置工程师</p>
<p>董松松松</p>
</td>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/tgsmdww.png?s=150">
<br>
<a href="https://github.com/tgsmdww">tgsmdww</a>
<p>前端开发</p>
<p>hzt</p>
</td>
</tr>
<tr>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/Tsukiko15.png?s=150">
<br>
<a href="https://github.com/Tsukiko15">Tsukiko15</a>
<p>后端开发</p>
<p>主席</p>
</td>
</tr>
<tr>
<td align="center" valign="top">
Expand All @@ -127,15 +113,26 @@ module.exports = {
<p>前端开发</p>
<p>qc</p>
</td>
<td align="center" valign="top">
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/tgsmdww.png?s=150">
<br>
<a href="https://github.com/AsukaSong">tgsmdww</a>
<p>前端开发</p>
<p>TG</p>
</td>
</tr>
<tr>
<td align="center" valign="top">
<img width="150" height="150" src="https://github.com/Tsukiko15.png?s=150">
<br>
<a href="https://github.com/Tsukiko15">Tsukiko15</a>
<p>后端开发</p>
<p>主席</p>
</td>
</tr>
</tbody>
</table>

### 联系方式

Email: [email protected]
14 changes: 2 additions & 12 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const path = require('path')
const HTMLWebpackPlugin = require("html-webpack-plugin")
const CopyWebpackPlugin = require('copy-webpack-plugin')
const WorkboxPlugin = require('workbox-webpack-plugin')
// const MiniCssExtractPlugin = require("mini-css-extract-plugin")

Expand Down Expand Up @@ -86,21 +85,12 @@ module.exports = {
inject: true,
}),

new CopyWebpackPlugin([{
from: 'public/manifest.json',
to: 'manifest.json'
},
{
from: 'public/icons/',
to: 'icons/'
},
]),

// workbox: https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin
new WorkboxPlugin.GenerateSW({
swDest: "service-worker.js",
clientsClaim: true,
importWorkboxFrom: 'local',
skipWaiting: true,
clientsClaim: true,
}),
],
}
4 changes: 4 additions & 0 deletions config/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ module.exports = merge(common, {
devtool: 'eval-source-map',

devServer: {
contentBase: [
path.join(__dirname, '../public'),
path.join(__dirname, '../dist'),
],
disableHostCheck: true,
historyApiFallback: true,
port: 9898,
Expand Down
16 changes: 13 additions & 3 deletions config/webpack.prod.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const path = require('path')
const CleanWebpackPlugin = require('clean-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin')

const merge = require("webpack-merge")
Expand All @@ -9,10 +10,19 @@ module.exports = merge(common, {
mode: "production",

plugins: [
new CleanWebpackPlugin(['dist'], {
root: path.resolve(__dirname, '../'),
verbose: true,
new CleanWebpackPlugin({
// verbose: true,
}),

new CopyWebpackPlugin([{
from: 'public/manifest.json',
to: 'manifest.json'
},
{
from: 'public/icons/',
to: 'icons/'
},
]),
],

optimization: {
Expand Down
2 changes: 1 addition & 1 deletion docs/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TODO
* 401 -用户名密码错误
* 50* -服务器内部错误

## 关注 (/myfollow)新帖 (/newTopics)搜索(/search)
## 关注 (/myfollow)新帖 (/newTopics)搜索(/search)
对获取关注信息的api进行处理

**navigate**
Expand Down
Loading

0 comments on commit 3d124b2

Please sign in to comment.