Skip to content

Commit

Permalink
style: -
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Jan 3, 2022
1 parent 725a9f0 commit 316b651
Show file tree
Hide file tree
Showing 61 changed files with 2,431 additions and 2,537 deletions.
31 changes: 11 additions & 20 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,14 @@
* revert:回滚某个更早之前的提交
*/
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feature',
'fixbug',
'refactor',
'docs',
'style',
'perf',
'chore',
'revert',
],
],
'subject-full-stop': [0, 'never'],
'subject-case': [0, 'never'],
},
}
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
['feature', 'fixbug', 'refactor', 'docs', 'style', 'perf', 'chore', 'revert'],
],
'subject-full-stop': [0, 'never'],
'subject-case': [0, 'never'],
},
};
190 changes: 95 additions & 95 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
{
"name": "vite+vue3 Template",
"version": "1.1.0",
"author": {
"name": "小斯斯",
"email": "[email protected]",
"url": "https://gitlab.com/SuperCuteXiaoSi"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"staging": "vite build --mode staging",
"serve": "vite preview",
"test:gzip": "http-server dist --cors --gzip -c-1",
"test:br": "http-server dist --cors --brotli -c-1",
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,js}\" --fix",
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,css,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --syntax scss \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged",
"lint:staged": "lint-staged",
"prepare": "husky install",
"push": "scp -r dist/* root@服务器公网IP:/服务器资源存放地址",
"build:push": "npm run build && npm run push"
},
"dependencies": {
"@element-plus/icons": "^0.0.11",
"axios": "^0.24.0",
"element-plus": "^1.2.0-beta.6",
"es6-promise": "^4.2.8",
"lodash-es": "^4.17.21",
"mockjs": "^1.1.0",
"pinia": "^2.0.6",
"vue": "^3.2.22",
"vue-i18n": "^9.1.9",
"vue-router": "^4.0.12",
"vuex": "^4.0.2"
},
"devDependencies": {
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@ehutch79/vite-eslint": "^0.0.1",
"@types/core-js": "^2.5.5",
"@types/lodash-es": "^4.17.5",
"@types/node": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@vitejs/plugin-vue": "^2.0.1",
"@vitejs/plugin-vue-jsx": "^1.3.3",
"@vue/compiler-sfc": "^3.2.26",
"@zougt/vite-plugin-theme-preprocessor": "^1.4.0",
"autoprefixer": "^10.4.0",
"babel-eslint": "^10.1.0",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.12.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.0.0",
"eslint-plugin-vue": "^8.2.0",
"http-server": "^14.0.0",
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"postcss-html": "^1.3.0",
"postcss-import": "^14.0.2",
"prettier": "2.5.1",
"pretty-quick": "^3.1.2",
"sass": "^1.45.0",
"stylelint": "^14.1.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-standard": "^24.0.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.0.1",
"typescript": "^4.5.4",
"vite": "^2.7.3",
"vite-plugin-compression": "^0.3.6",
"vite-plugin-linter": "^1.0.2",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-style-import": "^1.4.0",
"vite-plugin-svg-icons": "^1.0.5",
"vite-plugin-windicss": "^1.6.1",
"vue-tsc": "^0.29.8"
},
"license": "MIT",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"lint-staged": {
"*.vue": "eslint \"{src,mock}/**/*.{vue}\""
}
"name": "vite+vue3 Template",
"version": "1.1.0",
"author": {
"name": "小斯斯",
"email": "[email protected]",
"url": "https://gitlab.com/SuperCuteXiaoSi"
},
"scripts": {
"dev": "vite",
"build": "vite build",
"staging": "vite build --mode staging",
"serve": "vite preview",
"test:gzip": "http-server dist --cors --gzip -c-1",
"test:br": "http-server dist --cors --brotli -c-1",
"lint:eslint": "eslint \"{src,mock}/**/*.{vue,ts,js}\" --fix",
"lint:prettier": "prettier --write --loglevel warn \"src/**/*.{js,json,css,scss,vue,ts,tex,jsx,html,md}\"",
"lint:stylelint": "stylelint --syntax scss \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged",
"lint:staged": "lint-staged",
"prepare": "husky install",
"push": "scp -r dist/* root@服务器公网IP:/服务器资源存放地址",
"build:push": "npm run build && npm run push"
},
"dependencies": {
"@element-plus/icons": "^0.0.11",
"axios": "^0.24.0",
"element-plus": "^1.2.0-beta.6",
"es6-promise": "^4.2.8",
"lodash-es": "^4.17.21",
"mockjs": "^1.1.0",
"pinia": "^2.0.6",
"vue": "^3.2.22",
"vue-i18n": "^9.1.9",
"vue-router": "^4.0.12",
"vuex": "^4.0.2"
},
"devDependencies": {
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@ehutch79/vite-eslint": "^0.0.1",
"@types/core-js": "^2.5.5",
"@types/lodash-es": "^4.17.5",
"@types/node": "^17.0.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@vitejs/plugin-vue": "^2.0.1",
"@vitejs/plugin-vue-jsx": "^1.3.3",
"@vue/compiler-sfc": "^3.2.26",
"@zougt/vite-plugin-theme-preprocessor": "^1.4.0",
"autoprefixer": "^10.4.0",
"babel-eslint": "^10.1.0",
"commitizen": "^4.2.4",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^7.12.1",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^5.0.0",
"eslint-plugin-vue": "^8.2.0",
"http-server": "^14.0.0",
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"postcss-html": "^1.3.0",
"postcss-import": "^14.0.2",
"prettier": "2.5.1",
"pretty-quick": "^3.1.2",
"sass": "^1.45.0",
"stylelint": "^14.1.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recess-order": "^3.0.0",
"stylelint-config-standard": "^24.0.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.0.1",
"typescript": "^4.5.4",
"vite": "^2.7.3",
"vite-plugin-compression": "^0.3.6",
"vite-plugin-linter": "^1.0.2",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-style-import": "^1.4.0",
"vite-plugin-svg-icons": "^1.0.5",
"vite-plugin-windicss": "^1.6.1",
"vue-tsc": "^0.29.8"
},
"license": "MIT",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"lint-staged": {
"*.vue": "eslint \"{src,mock}/**/*.{vue}\""
}
}
31 changes: 9 additions & 22 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
module.exports = {
// tab缩进大小,默认为2
tabWidth: 2,
// 使用tab缩进,默认false
useTabs: true,
// 使用分号, 默认true
semi: false,
// 使用单引号, 默认false(在jsx中配置无效, 默认都是双引号)
singleQuote: true,
// 行尾逗号,默认none,可选 none|es5|all
// es5 包括es5中的数组、对象
// all 包括函数对象等所有可选
TrailingCooma: 'none',
// 对象中的空格 默认trueÏ
// true: { foo: bar }
// false: {foo: bar}
bracketSpacing: true,
// 箭头函数参数括号 默认avoid 可选 avoid| always
// avoid 能省略括号的时候就省略 例如x => x
// always 总是有括号
arrowParens: 'always',
'prettier/prettier': ['error', { singleQuote: true, parser: 'flow' }],
}
printWidth: 100,
semi: true,
vueIndentScriptAndStyle: true,
singleQuote: true,
trailingComma: 'all',
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
};
78 changes: 39 additions & 39 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
<template>
<el-config-provider :locale="tolocale">
<router-view />
</el-config-provider>
<el-config-provider :locale="tolocale">
<router-view />
</el-config-provider>
</template>

<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import { deffElementLocale } from '@/hooks/useI18n'
const { tolocale } = deffElementLocale()
// import { deffHttp } from './utils/axios';
// import HelloWorld from './components/HelloWorld.vue'
// const admin = 'asdasdasdas'
// This starter template is using Vue 3 experimental <script setup> SFCs
// Check out https://github.com/vuejs/rfcs/blob/script-setup-2/active-rfcs/0000-script-setup.md
// store.commit($mutation.SET_COLLAPSEMENU, locMenu)
// const req = async () => {
// const res = await deffHttp.post<void>({ url: '/mock_api/login',data:{username:'admin',password:'123123'} })
// console.log(res)
// }
// const req2 = async () => {
// const res = await deffHttp.get<void>(
// {
// url: '/mock_api/getUserInfo',
// },
// {
// isShowData: true,
// urlPrefix: 'https://xiaosisi.com',
// specialToken: 'asdasdasdasd',
// },
// );
// console.log(res);
// };
// req2();
import { ElConfigProvider } from 'element-plus';
import { deffElementLocale } from '@/hooks/useI18n';
const { tolocale } = deffElementLocale();
// import { deffHttp } from './utils/axios';
// import HelloWorld from './components/HelloWorld.vue'
// const admin = 'asdasdasdas'
// This starter template is using Vue 3 experimental <script setup> SFCs
// Check out https://github.com/vuejs/rfcs/blob/script-setup-2/active-rfcs/0000-script-setup.md
// store.commit($mutation.SET_COLLAPSEMENU, locMenu)
// const req = async () => {
// const res = await deffHttp.post<void>({ url: '/mock_api/login',data:{username:'admin',password:'123123'} })
// console.log(res)
// }
// const req2 = async () => {
// const res = await deffHttp.get<void>(
// {
// url: '/mock_api/getUserInfo',
// },
// {
// isShowData: true,
// urlPrefix: 'https://xiaosisi.com',
// specialToken: 'asdasdasdasd',
// },
// );
// console.log(res);
// };
// req2();
</script>

<style lang="scss">
#app {
color: #{$textColor};
}
#app {
color: #{$textColor};
}
</style>
Loading

0 comments on commit 316b651

Please sign in to comment.