chore: use pnpm replace yarn

This commit is contained in:
xiaoxian521 2021-11-03 13:58:24 +08:00
parent c25b130b7d
commit 6c02e97157
10 changed files with 7112 additions and 4882 deletions

View File

@ -47,9 +47,9 @@ jobs:
- name: Build - name: Build
run: | run: |
yarn install pnpm install
yarn lint pnpm lint
yarn build pnpm build
env: env:
VALIDATE_ALL_CODEBASE: false VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main DEFAULT_BRANCH: main

4
.gitignore vendored
View File

@ -6,8 +6,8 @@ dist-ssr
.eslintcache .eslintcache
npm-debug.log* npm-debug.log*
yarn-debug.log* .pnpm-error.log*
yarn-error.log* .pnpm-debug.log
tests/**/coverage/ tests/**/coverage/
# Editor directories and files # Editor directories and files

View File

@ -3,7 +3,7 @@ command_exists () {
command -v "$1" >/dev/null 2>&1 command -v "$1" >/dev/null 2>&1
} }
# Workaround for Windows 10, Git Bash and Yarn # Workaround for Windows 10, Git Bash and Pnpm
if command_exists winpty && test -t 1; then if command_exists winpty && test -t 1; then
exec < /dev/tty exec < /dev/tty
fi fi

View File

@ -9,7 +9,6 @@
"terminal.integrated.rendererType": "dom", "terminal.integrated.rendererType": "dom",
"editor.formatOnType": true, "editor.formatOnType": true,
"editor.formatOnSave": true, "editor.formatOnSave": true,
"window.zoomLevel": 1,
"javascript.updateImportsOnFileMove.enabled": "always", "javascript.updateImportsOnFileMove.enabled": "always",
"[vue]": { "[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"

View File

@ -59,20 +59,20 @@ git clone https://github.com.cnpmjs.org/xiaoxian521/vue-pure-admin.git
```bash ```bash
cd vue-pure-admin cd vue-pure-admin
yarn install pnpm install
``` ```
- run - run
```bash ```bash
yarn serve pnpm serve
``` ```
- build - build
```bash ```bash
yarn build pnpm build
``` ```
## Change Log ## Change Log

View File

@ -59,20 +59,20 @@ git clone https://github.com.cnpmjs.org/xiaoxian521/vue-pure-admin.git
```bash ```bash
cd vue-pure-admin cd vue-pure-admin
yarn install pnpm install
``` ```
- 运行 - 运行
```bash ```bash
yarn serve pnpm serve
``` ```
- 打包 - 打包
```bash ```bash
yarn build pnpm build
``` ```
## 更新日志 ## 更新日志

View File

@ -2,25 +2,42 @@
"name": "vue-pure-admin", "name": "vue-pure-admin",
"version": "2.1.0", "version": "2.1.0",
"private": true, "private": true,
"packageManager": "pnpm@6.20.1",
"workspaces": [
"build/**",
"mock/**",
"src/**",
"types/**"
],
"engines": {
"node": ">= 16",
"pnpm": ">= 6"
},
"scripts": { "scripts": {
"dev": "cross-env --max_old_space_size=4096 vite", "dev": "cross-env --max_old_space_size=4096 vite",
"serve": "yarn dev", "serve": "pnpm dev",
"build": "rimraf dist && cross-env vite build", "build": "rimraf dist && cross-env vite build",
"preview": "vite preview", "preview": "vite preview",
"preview:build": "yarn build && vite preview", "preview:build": "pnpm build && vite preview",
"clean:cache": "rm -rf node_modules && rm -rf .eslintcache && yarn cache clean && yarn", "clean:cache": "rm -rf node_modules && rm -rf .eslintcache && pnpm install",
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,css,scss,postcss,less}\" --cache --cache-location node_modules/.cache/stylelint/", "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,css,scss,postcss,less}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js", "lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
"lint:pretty": "pretty-quick --staged", "lint:pretty": "pretty-quick --staged",
"lint": "yarn lint:eslint && yarn lint:prettier && yarn lint:stylelint && yarn lint:pretty", "lint": "pnpm lint:eslint && pnpm lint:prettier && pnpm lint:stylelint && pnpm lint:pretty",
"prepare": "husky install" "prepare": "husky install",
"preinstall": "npx only-allow pnpm"
}, },
"browserslist": [
"> 1%",
"not ie 11",
"not op_mini all"
],
"dependencies": { "dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1", "@amap/amap-jsapi-loader": "^1.0.1",
"@logicflow/core": "^0.7.1", "@logicflow/core": "0.7.1",
"@logicflow/extension": "^0.7.1", "@logicflow/extension": "0.7.1",
"@vueuse/core": "^6.7.1", "@vueuse/core": "^6.7.1",
"@vueuse/motion": "^2.0.0-beta.4", "@vueuse/motion": "^2.0.0-beta.4",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
@ -44,60 +61,60 @@
"responsive-storage": "^1.0.11", "responsive-storage": "^1.0.11",
"sortablejs": "1.13.0", "sortablejs": "1.13.0",
"typescript-cookie": "^1.0.0", "typescript-cookie": "^1.0.0",
"v-contextmenu": "^3.0.0", "v-contextmenu": "3.0.0",
"vue": "^3.2.20", "vue": "^3.2.20",
"vue-i18n": "^9.2.0-beta.3", "vue-i18n": "^9.2.0-beta.3",
"vue-json-pretty": "^2.0.2", "vue-json-pretty": "^2.0.2",
"vue-router": "^4.0.11", "vue-router": "^4.0.11",
"vue-types": "^4.1.0", "vue-types": "^4.1.0",
"vuedraggable": "^4.1.0", "vuedraggable": "4.1.0",
"vxe-table": "^4.0.30", "vxe-table": "4.0.30",
"wangeditor": "^4.7.7", "wangeditor": "4.7.7",
"xe-ajax": "^4.0.5", "xe-ajax": "4.0.5",
"xe-utils": "^3.4.0", "xe-utils": "3.4.0",
"xgplayer": "^2.28.0" "xgplayer": "2.28.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "^13.1.0", "@commitlint/cli": "13.1.0",
"@commitlint/config-conventional": "^13.1.0", "@commitlint/config-conventional": "13.1.0",
"@types/element-resize-detector": "^1.1.3", "@types/element-resize-detector": "1.1.3",
"@types/mockjs": "^1.0.3", "@types/mockjs": "1.0.3",
"@types/node": "^14.14.14", "@types/node": "14.14.14",
"@types/nprogress": "^0.2.0", "@types/nprogress": "0.2.0",
"@typescript-eslint/eslint-plugin": "^4.31.0", "@typescript-eslint/eslint-plugin": "4.31.0",
"@typescript-eslint/parser": "^4.31.0", "@typescript-eslint/parser": "4.31.0",
"@vitejs/plugin-vue": "^1.6.0", "@vitejs/plugin-vue": "1.6.0",
"@vitejs/plugin-vue-jsx": "^1.1.7", "@vitejs/plugin-vue-jsx": "1.1.7",
"@vue/compiler-sfc": "^3.2.20", "@vue/compiler-sfc": "3.2.20",
"@vue/eslint-config-prettier": "^6.0.0", "@vue/eslint-config-prettier": "6.0.0",
"@vue/eslint-config-typescript": "^7.0.0", "@vue/eslint-config-typescript": "7.0.0",
"autoprefixer": "^10.2.4", "autoprefixer": "10.2.4",
"babel-plugin-transform-remove-console": "^6.9.4", "babel-plugin-transform-remove-console": "6.9.4",
"chalk": "^2.4.2", "chalk": "2.4.2",
"cross-env": "^7.0.3", "cross-env": "7.0.3",
"eslint": "^7.30.0", "eslint": "7.30.0",
"eslint-plugin-prettier": "^3.4.0", "eslint-plugin-prettier": "3.4.0",
"eslint-plugin-vue": "^7.17.0", "eslint-plugin-vue": "7.17.0",
"husky": "^7.0.2", "husky": "7.0.2",
"lint-staged": "^11.1.2", "lint-staged": "11.1.2",
"postcss": "^8.2.6", "postcss": "8.2.6",
"postcss-import": "^14.0.0", "postcss-import": "14.0.0",
"prettier": "^2.3.2", "prettier": "2.3.2",
"pretty-quick": "^3.1.1", "pretty-quick": "3.1.1",
"rimraf": "^3.0.2", "rimraf": "3.0.2",
"sass": "^1.38.0", "sass": "1.38.0",
"sass-loader": "^12.1.0", "sass-loader": "12.1.0",
"stylelint": "^13.13.1", "stylelint": "13.13.1",
"stylelint-config-prettier": "^8.0.2", "stylelint-config-prettier": "8.0.2",
"stylelint-config-standard": "^22.0.0", "stylelint-config-standard": "22.0.0",
"stylelint-order": "^4.1.0", "stylelint-order": "4.1.0",
"typescript": "^4.4.2", "typescript": "4.4.2",
"unplugin-element-plus": "^0.1.0", "unplugin-element-plus": "^0.1.0",
"vite": "^2.6.10", "vite": "latest",
"vite-plugin-mock": "^2.9.6", "vite-plugin-mock": "^2.9.6",
"vite-plugin-style-import": "^1.2.1", "vite-plugin-style-import": "^1.2.1",
"vite-svg-loader": "^2.2.0", "vite-svg-loader": "^2.2.0",
"vue-eslint-parser": "^7.10.0" "vue-eslint-parser": "7.10.0"
}, },
"repository": "git@github.com:xiaoxian521/vue-pure-admin.git", "repository": "git@github.com:xiaoxian521/vue-pure-admin.git",
"author": "xiaoxian521", "author": "xiaoxian521",

7026
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

6
pnpm-workspace.yaml Normal file
View File

@ -0,0 +1,6 @@
#
packages:
- "build/**"
- "mock/**"
- "src/**"
- "types/**"

4818
yarn.lock

File diff suppressed because it is too large Load Diff