chore: optimize package scripts

This commit is contained in:
pengzhanbo 2024-07-18 00:09:16 +08:00
parent 4c6cbd285b
commit 257d2c9db2
4 changed files with 16 additions and 90 deletions

View File

@ -29,5 +29,5 @@ jobs:
- name: Linter - name: Linter
run: | run: |
pnpm run lint pnpm run lint:check
pnpm run lint:css pnpm run lint:css

View File

@ -14,28 +14,26 @@
"vuepress-theme-plume" "vuepress-theme-plume"
], ],
"engines": { "engines": {
"node": "^18 || >=20.0.0", "node": "^18.19.0 || >=20.0.0",
"pnpm": ">=9" "pnpm": ">=9"
}, },
"scripts": { "scripts": {
"build": "pnpm run clean && pnpm run build:package", "build": "pnpm clean && pnpm build:package",
"build:package": "pnpm --filter=!docs run -r --stream build", "build:package": "pnpm -r --stream build",
"clean": "pnpm --filter=!docs run -r --stream clean", "clean": "pnpm -r --stream clean",
"dev": "concurrently \"pnpm run dev:package\" \"pnpm run docs\"", "dev": "pnpm --stream '/(dev:package|docs:dev)/'",
"dev:package": "pnpm --filter=!docs --parallel dev", "dev:package": "pnpm --parallel dev",
"dev:theme": "concurrently \"pnpm --filter=vuepress-theme-plume dev\" \"pnpm run docs\"", "docs:dev": "pnpm -F=docs docs:dev",
"docs": "pnpm --filter=docs docs:dev", "docs:build": "pnpm -F=docs docs:build",
"docs:build": "pnpm --filter=docs docs:build", "docs:clean": "pnpm -F=docs docs:clean",
"docs:clean": "pnpm --filter=docs docs:clean", "docs:serve": "pnpm -F=docs docs:serve",
"docs:serve": "pnpm --filter=docs docs:serve", "lint": "pnpm lint:check && pnpm lint:css",
"commit": "cz", "lint:check": "eslint .",
"lint": "eslint .",
"lint:css": "stylelint **/*.{css,scss,vue}", "lint:css": "stylelint **/*.{css,scss,vue}",
"prepare": "husky", "prepare": "husky",
"release": "pnpm release:check && pnpm release:version && pnpm release:publish", "release": "pnpm release:check && pnpm release:version && pnpm -r publish",
"release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "release:changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"release:check": "pnpm lint && pnpm lint:css && pnpm build", "release:check": "pnpm lint && pnpm build",
"release:publish": "pnpm -r publish",
"release:version": "bumpp package.json plugins/*/package.json theme/package.json --execute=\"pnpm release:changelog\" --commit \"build: publish v%s\" --all --tag --push" "release:version": "bumpp package.json plugins/*/package.json theme/package.json --execute=\"pnpm release:changelog\" --commit \"build: publish v%s\" --all --tag --push"
}, },
"devDependencies": { "devDependencies": {
@ -48,7 +46,6 @@
"@types/webpack-env": "^1.18.5", "@types/webpack-env": "^1.18.5",
"bumpp": "^9.4.1", "bumpp": "^9.4.1",
"commitizen": "^4.3.0", "commitizen": "^4.3.0",
"concurrently": "^8.2.2",
"conventional-changelog-cli": "^5.0.0", "conventional-changelog-cli": "^5.0.0",
"cpx2": "^7.0.1", "cpx2": "^7.0.1",
"cz-conventional-changelog": "^3.3.0", "cz-conventional-changelog": "^3.3.0",

70
pnpm-lock.yaml generated
View File

@ -35,9 +35,6 @@ importers:
commitizen: commitizen:
specifier: ^4.3.0 specifier: ^4.3.0
version: 4.3.0(@types/node@20.12.10)(typescript@5.5.3) version: 4.3.0(@types/node@20.12.10)(typescript@5.5.3)
concurrently:
specifier: ^8.2.2
version: 8.2.2
conventional-changelog-cli: conventional-changelog-cli:
specifier: ^5.0.0 specifier: ^5.0.0
version: 5.0.0 version: 5.0.0
@ -262,9 +259,6 @@ importers:
'@pengzhanbo/utils': '@pengzhanbo/utils':
specifier: ^1.1.2 specifier: ^1.1.2
version: 1.1.2 version: 1.1.2
'@vue/devtools-api':
specifier: 6.6.3
version: 6.6.3
'@vuepress-plume/plugin-baidu-tongji': '@vuepress-plume/plugin-baidu-tongji':
specifier: workspace:* specifier: workspace:*
version: link:../plugins/plugin-baidu-tongji version: link:../plugins/plugin-baidu-tongji
@ -473,10 +467,6 @@ packages:
engines: {node: '>=6.0.0'} engines: {node: '>=6.0.0'}
hasBin: true hasBin: true
'@babel/runtime@7.21.5':
resolution: {integrity: sha512-8jI69toZqqcsnqGGqwGS4Qb1VwLOEp4hz+CXPywcvjs60u3B4Pom/U/7rm4W8tMOYEB+E9wgD0mW1l3r8qlI9Q==}
engines: {node: '>=6.9.0'}
'@babel/types@7.24.6': '@babel/types@7.24.6':
resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==} resolution: {integrity: sha512-WaMsgi6Q8zMgMth93GvWPXkhAIEobfsIkLTacoVZoK1J0CevIPGYY2Vo5YvJGqyHqXM6P4ppOYGsIRU8MM9pFQ==}
engines: {node: '>=6.9.0'} engines: {node: '>=6.9.0'}
@ -2150,11 +2140,6 @@ packages:
concat-map@0.0.1: concat-map@0.0.1:
resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=}
concurrently@8.2.2:
resolution: {integrity: sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==}
engines: {node: ^14.13.0 || >=16.0.0}
hasBin: true
confbox@0.1.3: confbox@0.1.3:
resolution: {integrity: sha512-eH3ZxAihl1PhKfpr4VfEN6/vUd87fmgb6JkldHgg/YR6aEBhW63qUDgzP2Y6WM0UumdsYp5H3kibalXAdHfbgg==} resolution: {integrity: sha512-eH3ZxAihl1PhKfpr4VfEN6/vUd87fmgb6JkldHgg/YR6aEBhW63qUDgzP2Y6WM0UumdsYp5H3kibalXAdHfbgg==}
@ -2470,10 +2455,6 @@ packages:
resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==} resolution: {integrity: sha512-wAV9QHOsNbwnWdNW2FYvE1P56wtgSbM+3SZcdGiWQILwVjACCXDCI3Ai8QlCjMDB8YK5zySiXZYBiwGmNY3lnw==}
engines: {node: '>=12'} engines: {node: '>=12'}
date-fns@2.30.0:
resolution: {integrity: sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==}
engines: {node: '>=0.11'}
date-fns@3.6.0: date-fns@3.6.0:
resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==}
@ -4433,9 +4414,6 @@ packages:
resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==} resolution: {integrity: sha512-J8rn6v4DBb2nnFqkqwy6/NnTYMcgLA+sLr0iIO41qpv0n+ngb7ksag2tMRl0inb1bbO/esUwzW1vbJi7K0sI0g==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
regenerator-runtime@0.13.11:
resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==}
regexp-ast-analysis@0.7.1: regexp-ast-analysis@0.7.1:
resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==} resolution: {integrity: sha512-sZuz1dYW/ZsfG17WSAG7eS85r5a0dDsvg+7BiiYR5o6lKCAtUrEwdmRmaGF6rwVj3LcmAeYkOWKEPlbPzN3Y3A==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
@ -4527,9 +4505,6 @@ packages:
rxjs@7.8.0: rxjs@7.8.0:
resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==} resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
rxjs@7.8.1:
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
sade@1.8.1: sade@1.8.1:
resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==}
engines: {node: '>=6'} engines: {node: '>=6'}
@ -4648,9 +4623,6 @@ packages:
resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==}
engines: {node: '>=0.10.0'} engines: {node: '>=0.10.0'}
spawn-command@0.0.2:
resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==}
spdx-correct@3.1.1: spdx-correct@3.1.1:
resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==}
@ -4813,10 +4785,6 @@ packages:
resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==}
engines: {node: '>=8'} engines: {node: '>=8'}
supports-color@8.1.1:
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
engines: {node: '>=10'}
supports-hyperlinks@3.0.0: supports-hyperlinks@3.0.0:
resolution: {integrity: sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==} resolution: {integrity: sha512-QBDPHyPQDRTy9ku4URNGY5Lah8PAaXs6tAAwp55sL5WCsSW7GIfdf6W5ixfziW+t7wh3GVvHyHHyQ1ESsoRvaA==}
engines: {node: '>=14.18'} engines: {node: '>=14.18'}
@ -4891,10 +4859,6 @@ packages:
resolution: {integrity: sha512-khrZo4buq4qVmsGzS5yQjKe/WsFvV8fGfOjDQN0q4iy9FjRfPWRgTFrU8u1R2iu/SfWLhY9WnCi4Jhdrcbtg+g==} resolution: {integrity: sha512-khrZo4buq4qVmsGzS5yQjKe/WsFvV8fGfOjDQN0q4iy9FjRfPWRgTFrU8u1R2iu/SfWLhY9WnCi4Jhdrcbtg+g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
tree-kill@1.2.2:
resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}
hasBin: true
trim-lines@3.0.1: trim-lines@3.0.1:
resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}
@ -5426,10 +5390,6 @@ snapshots:
dependencies: dependencies:
'@babel/types': 7.24.6 '@babel/types': 7.24.6
'@babel/runtime@7.21.5':
dependencies:
regenerator-runtime: 0.13.11
'@babel/types@7.24.6': '@babel/types@7.24.6':
dependencies: dependencies:
'@babel/helper-string-parser': 7.24.7 '@babel/helper-string-parser': 7.24.7
@ -7285,18 +7245,6 @@ snapshots:
concat-map@0.0.1: {} concat-map@0.0.1: {}
concurrently@8.2.2:
dependencies:
chalk: 4.1.2
date-fns: 2.30.0
lodash: 4.17.21
rxjs: 7.8.1
shell-quote: 1.8.1
spawn-command: 0.0.2
supports-color: 8.1.1
tree-kill: 1.2.2
yargs: 17.7.2
confbox@0.1.3: {} confbox@0.1.3: {}
connect-history-api-fallback@2.0.0: {} connect-history-api-fallback@2.0.0: {}
@ -7673,10 +7621,6 @@ snapshots:
dargs@8.1.0: {} dargs@8.1.0: {}
date-fns@2.30.0:
dependencies:
'@babel/runtime': 7.21.5
date-fns@3.6.0: {} date-fns@3.6.0: {}
dayjs@1.11.11: {} dayjs@1.11.11: {}
@ -9943,8 +9887,6 @@ snapshots:
dependencies: dependencies:
'@eslint-community/regexpp': 4.10.0 '@eslint-community/regexpp': 4.10.0
regenerator-runtime@0.13.11: {}
regexp-ast-analysis@0.7.1: regexp-ast-analysis@0.7.1:
dependencies: dependencies:
'@eslint-community/regexpp': 4.10.0 '@eslint-community/regexpp': 4.10.0
@ -10040,10 +9982,6 @@ snapshots:
dependencies: dependencies:
tslib: 2.6.2 tslib: 2.6.2
rxjs@7.8.1:
dependencies:
tslib: 2.6.2
sade@1.8.1: sade@1.8.1:
dependencies: dependencies:
mri: 1.2.0 mri: 1.2.0
@ -10153,8 +10091,6 @@ snapshots:
source-map@0.6.1: {} source-map@0.6.1: {}
spawn-command@0.0.2: {}
spdx-correct@3.1.1: spdx-correct@3.1.1:
dependencies: dependencies:
spdx-expression-parse: 3.0.1 spdx-expression-parse: 3.0.1
@ -10342,10 +10278,6 @@ snapshots:
dependencies: dependencies:
has-flag: 4.0.0 has-flag: 4.0.0
supports-color@8.1.1:
dependencies:
has-flag: 4.0.0
supports-hyperlinks@3.0.0: supports-hyperlinks@3.0.0:
dependencies: dependencies:
has-flag: 4.0.0 has-flag: 4.0.0
@ -10415,8 +10347,6 @@ snapshots:
dependencies: dependencies:
eslint-visitor-keys: 3.4.3 eslint-visitor-keys: 3.4.3
tree-kill@1.2.2: {}
trim-lines@3.0.1: {} trim-lines@3.0.1: {}
ts-api-utils@1.3.0(typescript@5.5.3): ts-api-utils@1.3.0(typescript@5.5.3):

View File

@ -54,11 +54,11 @@
"templates" "templates"
], ],
"scripts": { "scripts": {
"dev": "pnpm '/(copy|ts):watch/'",
"build": "pnpm run copy && pnpm run ts", "build": "pnpm run copy && pnpm run ts",
"clean": "rimraf --glob ./lib ./*.tsbuildinfo", "clean": "rimraf --glob ./lib ./*.tsbuildinfo",
"copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png,woff2}\" lib", "copy": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png,woff2}\" lib",
"copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png,woff2}\" lib -w", "copy:watch": "cpx \"src/**/*.{d.ts,vue,css,scss,jpg,png,woff2}\" lib -w",
"dev": "concurrently \"pnpm copy:watch\" \"pnpm ts:watch\"",
"ts": "tsc -b tsconfig.build.json", "ts": "tsc -b tsconfig.build.json",
"ts:watch": "tsc -b tsconfig.build.json --watch" "ts:watch": "tsc -b tsconfig.build.json --watch"
}, },
@ -67,7 +67,6 @@
}, },
"dependencies": { "dependencies": {
"@pengzhanbo/utils": "^1.1.2", "@pengzhanbo/utils": "^1.1.2",
"@vue/devtools-api": "6.6.3",
"@vuepress-plume/plugin-baidu-tongji": "workspace:*", "@vuepress-plume/plugin-baidu-tongji": "workspace:*",
"@vuepress-plume/plugin-content-update": "workspace:*", "@vuepress-plume/plugin-content-update": "workspace:*",
"@vuepress-plume/plugin-fonts": "workspace:*", "@vuepress-plume/plugin-fonts": "workspace:*",