Skip to content

Commit

Permalink
Chore: 升级依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
Maorey committed Feb 13, 2020
1 parent 51f6d0a commit 2da9980
Show file tree
Hide file tree
Showing 21 changed files with 1,807 additions and 1,733 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ indent_size = 2
end_of_line = lf
quote_type = single
indent_style = space
max_line_length = 80
max_line_length = 100
insert_final_newline = true
spaces_around_operators = true
trim_trailing_whitespace = true
Expand Down
32 changes: 26 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ module.exports = {
extends: [
'plugin:vue/recommended', // vue 代码风格预设
'@vue/standard',
'@vue/typescript',
'@vue/typescript/recommended',
],
plugins: ['@typescript-eslint'],
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
// parser: '@typescript-eslint/parser',
},
overrides: [
{
Expand Down Expand Up @@ -49,7 +50,7 @@ module.exports = {
'max-len': [
'error',
{
code: 80,
code: 100,
tabWidth: 2,
ignoreUrls: true,
ignoreStrings: true,
Expand All @@ -59,17 +60,36 @@ module.exports = {
], // 最大列数
'max-params': ['error', 7], // function最大参数数
'max-statements': ['error', 120], // function最大语句数
'curly': 'error', // 控制语句不允许省略大括号
curly: 'error', // 控制语句不允许省略大括号
'no-lonely-if': 'error',
'no-dupe-else-if': 'error',
'no-debugger': ENV,
'no-console': [ENV, { allow: ['info', 'warn', 'error'] }],
camelcase: ['error', { allow: ['^\\$_', '^_\\$'] }],
'prefer-spread': 0,
'prefer-rest-params': 0,

/// TSLint https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules ///
'no-unused-vars': 'off',
/// typescript-eslint https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules ///
// 'no-unused-vars': 'off', // in extends
'@typescript-eslint/camelcase': ['error', { allow: ['^\\$_', '^_\\$'] }],
'@typescript-eslint/no-unused-vars': ENV,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/class-name-casing': 'error', // 类名 PascalCase
'@typescript-eslint/no-use-before-define': [
ENV,
{ functions: false, classes: false },
],
'@typescript-eslint/interface-name-prefix': ['error', 'always'], // 接口I开头
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: { delimiter: 'none' },
singleline: { delimiter: 'semi' },
},
],

/// Vue https://eslint.vuejs.org/rules/ ///
'vue/component-name-in-template-casing': 'error',
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"editor.tabSize": 2,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 80,
"editor.wordWrapColumn": 100,
"editor.fontLigatures": true,
"editor.wrappingIndent": "indent",
"editor.detectIndentation": false,
Expand Down
77 changes: 53 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ vue + vuex + vue router + TypeScript(支持 JavaScript) 模板

[更新日志](CHANGELOG.md)

- [环境要求](#环境要求)
- [建议开发环境](#建议开发环境)
- [浏览器支持](#浏览器支持)
- [命令参考](#命令参考)
- [安装项目](#安装项目)
- [可选项](#可选项)
Expand All @@ -20,8 +23,6 @@ vue + vuex + vue router + TypeScript(支持 JavaScript) 模板
- [优化](#优化)
- [web 页面](#web%20页面)
- [工程](#工程)
- [IDE](#ide)
- [浏览器支持](#浏览器支持)
- [部署](<#部署(nginx)>)
- [备忘](#备忘)
- [文档](#文档)
Expand All @@ -30,6 +31,40 @@ vue + vuex + vue router + TypeScript(支持 JavaScript) 模板
- [问题及思考](#问题及思考)
- [其他](#其他)

## 环境要求

- `Node.js`: 建议 v12.13.1
- `yarn`: 建议 v1.21.1

### 建议开发环境

- `Git`: 最新 代码管理
- `Visual Studio Code` (VSCode): 最新 IDE

VSCode 插件

- `Vetur`: 最新 vue 开发必备
- `GitLens`: 最新 Git 可视化工具
- `ESLint`: 最新 脚本代码检查
- `stylelint`: 最新 样式代码检查
- `Prettier - Code formatter`: 最新 代码格式化

浏览器插件

- `Vue Devtools`: 最新

> 推荐工具: [`@vue/cli`](https://cli.vuejs.org/zh/guide), 全局安装时可使用 `vue ui` 命令启动图形化界面管理项目
> 推荐字体: [FiraCode](https://github.com/tonsky/FiraCode)
## 浏览器支持

支持现代浏览器及 IE10+

| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :-: | :-: | :-: | :-: |
| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |

## 命令参考

### 安装项目
Expand Down Expand Up @@ -310,7 +345,21 @@ yarn vue-cli-service help # [命令] : 比如 yarn vue-cli-service help test:e2e
- `js`: `.vue` 文件中使用, `JavaScript`
- `vue`: `.jsx` 文件中使用, `JavaScript`
- `vuex`: `.js` 文件中使用, `vuex module` class语法
- 请[规范](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md)提交消息
- **Git 提交信息规范**参考 [vue](https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md) 规范 ([Angular](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular))

- `Feat` 增加新功能
- `Fix` 修复问题/BUG
- `Style` 代码风格相关无影响运行结果的
- `Perf` 优化/性能提升
- `Refactor` 重构
- `Polish` 润色
- `Revert` 撤销修改
- `Test` 测试相关
- `Docs` 文档/注释
- `Chore` 依赖更新/脚手架配置修改等
- `Workflow` 工作流改进
- `Ci` 持续集成
- `Mod` 不确定分类的修改

### 其他

Expand Down Expand Up @@ -527,27 +576,6 @@ yarn vue-cli-service help # [命令] : 比如 yarn vue-cli-service help test:e2e
- 需要在 `yarn.lock` (或 `package-lock.json` ) 中, 指定**所有** `mini-css-extract-plugin` 的版本为 `package.json` 对应版本
- 相同chunk下的基础样式(非皮肤样式)文件合并(比如css和scss)
### IDE
推荐使用: **Visual Studio Code** (VSCode), 推荐插件:
- Vetur: vue 开发必备
- ESLint & stylelint: 代码检查
- Prettier - Code formatter: 代码格式化
- GitLens: Git 工具
> 推荐工具: [`@vue/cli`](https://cli.vuejs.org/zh/guide), 全局安装时可使用 `vue ui` 命令启动图形化界面管理项目
> 推荐字体: [FiraCode](https://github.com/tonsky/FiraCode)
## 浏览器支持
支持现代浏览器及 IE10+
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :-: | :-: | :-: | :-: |
| IE10, IE11, Edge | last 2 versions | last 2 versions | last 2 versions |
## 部署(nginx)
- chunk hash 长度: 修改 [webpack.optimize.SplitChunksPlugin](node_modules/webpack/lib/optimize/SplitChunksPlugin.js)
Expand Down Expand Up @@ -683,6 +711,7 @@ http {
- scss 模块化: 已出 beta 但生态不完善, [草案](https://github.com/sass/sass/blob/master/accepted/module-system.md)
- [微前端化](https://github.com/phodal/microfrontends#复合型): 应考虑基于 [Web Components](https://developer.mozilla.org/zh-CN/docs/Web/Web_Components) ([vue 友好](https://cli.vuejs.org/zh/guide/build-targets.html#web-components-组件), 可以兼容其他) 的集成和通信.
- `tsx` 类型支持(去掉`as any`, 利于重构)
- 是否只下载当前皮肤(应无必要, 又不影响性能, 未验证移动端换肤方案是否可行)
### 其他
Expand Down
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ module.exports = {
// '@babel/plugin-syntax-bigint',
'@babel/plugin-proposal-function-sent',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-proposal-optional-chaining',
// '@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-proposal-nullish-coalescing-operator',
// '@babel/plugin-proposal-nullish-coalescing-operator',
],
}
1 change: 1 addition & 0 deletions build/devServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = function(ENV) {
port,
https,
proxy,
clientLogLevel: 'warn',
overlay: { errors: true }, // lint
openPage: ENV.DEV_SERVER_PAGE || '',
}
Expand Down
54 changes: 26 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-tpl",
"author": "毛瑞 <[email protected]>",
"version": "1.1.0",
"version": "1.1.1",
"private": false,
"license": "MIT",
"keywords": [
Expand All @@ -27,76 +27,74 @@
"test:unit": "npx --max_old_space_size=4096 vue-cli-service test:unit --detectOpenHandles --coverage"
},
"dependencies": {
"axios": "^0.19.1",
"axios": "^0.19.2",
"core-js": "^3.6.4",
"crypto-js": "^3.1.9-1",
"crypto-js": "^3.3.0",
"d3": "^5.15.0",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
"jsencrypt": "^3.0.0-rc.1",
"luma.gl": "^7.3.2",
"normalize.css": "^8.0.1",
"nprogress": "^0.2.0",
"pixi.js": "^5.2.0",
"pixi.js-legacy": "^5.2.0",
"pixi.js": "^5.2.1",
"pixi.js-legacy": "^5.2.1",
"register-service-worker": "^1.6.2",
"three": "^0.112.1",
"three": "^0.113.2",
"vue": "^2.6.11",
"vue-class-component": "^7.2.2",
"vue-i18n": "^8.15.3",
"vue-property-decorator": "^8.3.0",
"vue-property-decorator": "^8.4.0",
"vue-router": "^3.1.5",
"vuex": "^3.1.2",
"vuex-class": "^0.3.2",
"vuex-module-decorators": "^0.11.0",
"vuex-module-decorators": "^0.16.1",
"zdog": "^1.1.1",
"zrender": "^4.2.0"
},
"devDependencies": {
"@babel/plugin-proposal-export-default-from": "^7.8.3",
"@babel/plugin-proposal-export-namespace-from": "^7.8.3",
"@babel/plugin-proposal-function-sent": "^7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@babel/plugin-proposal-private-methods": "^7.8.3",
"@types/crypto-js": "^3.1.43",
"@types/d3": "^5.7.2",
"@types/echarts": "^4.4.2",
"@types/jest": "^24.9.0",
"@typescript-eslint/eslint-plugin": "^2.17.0",
"@typescript-eslint/parser": "^2.17.0",
"@vue/cli-plugin-babel": "^4.1.2",
"@vue/cli-plugin-e2e-cypress": "^4.1.2",
"@vue/cli-plugin-eslint": "^4.1.2",
"@vue/cli-plugin-pwa": "^4.1.2",
"@vue/cli-plugin-router": "^4.1.2",
"@vue/cli-plugin-typescript": "^4.1.2",
"@vue/cli-plugin-unit-jest": "^4.1.2",
"@vue/cli-plugin-vuex": "^4.1.2",
"@vue/cli-service": "^4.1.2",
"@vue/eslint-config-standard": "^5.1.0",
"@types/echarts": "^4.4.3",
"@types/jest": "^25.1.2",
"@typescript-eslint/eslint-plugin": "^2.19.2",
"@typescript-eslint/parser": "^2.19.2",
"@vue/cli-plugin-babel": "^4.2.2",
"@vue/cli-plugin-e2e-cypress": "^4.2.2",
"@vue/cli-plugin-eslint": "^4.2.2",
"@vue/cli-plugin-pwa": "^4.2.2",
"@vue/cli-plugin-router": "^4.2.2",
"@vue/cli-plugin-typescript": "^4.2.2",
"@vue/cli-plugin-unit-jest": "^4.2.2",
"@vue/cli-plugin-vuex": "^4.2.2",
"@vue/cli-service": "^4.2.2",
"@vue/eslint-config-standard": "^5.1.1",
"@vue/eslint-config-typescript": "^5.0.1",
"@vue/test-utils": "^1.0.0-beta.31",
"compression-webpack-plugin": "^3.1.0",
"eslint": "^6.8.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"eslint-plugin-vue": "^6.1.2",
"fibers": "^4.0.2",
"hard-source-webpack-plugin": "^0.13.1",
"lint-staged": "^10.0.1",
"lint-staged": "^10.0.7",
"mini-css-extract-plugin": "Maorey/alternate-css-extract-plugin#8cb509511d4acc77f4a48509edca8f2ee899da21",
"postcss-preset-env": "^6.7.0",
"regenerate": "^1.4.0",
"regjsgen": "^0.5.1",
"regjsparser": "^0.6.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"stylelint": "^13.0.0",
"stylelint": "^13.1.0",
"stylelint-config-scss-maorey": "^1.1.1",
"stylelint-webpack-plugin": "^1.2.1",
"stylelint-webpack-plugin": "^1.2.3",
"typescript": "^3.7.5",
"unicode-match-property-ecmascript": "^1.0.4",
"unicode-match-property-value-ecmascript": "^1.1.0",
Expand Down
Loading

0 comments on commit 2da9980

Please sign in to comment.