chore: 🚀 包管理工具迁移至pnpm

This commit is contained in:
Moonofweisheng 2024-01-01 23:32:05 +08:00
parent 1cea4bb2f8
commit 49bb29d6bf
11 changed files with 10487 additions and 8641 deletions

View File

@ -53,6 +53,9 @@ npm run commit
# 或者 # 或者
yarn commit yarn commit
# 或者
pnpm commit
## 执行命令后根据修改类型选择 ## 执行命令后根据修改类型选择
``` ```

View File

@ -46,5 +46,5 @@ jobs:
- name: upload - name: upload
run: | run: |
npm i uni-mini-ci -g npm i uni-mini-ci -g
yarn install pnpm install
yarn upload:mp-alipay pnpm upload:mp-alipay

View File

@ -18,10 +18,10 @@ jobs:
registry-url: https://registry.npmjs.org registry-url: https://registry.npmjs.org
- name: Install Dependencies - name: Install Dependencies
run: yarn run: pnpm
- name: Run Compiler - name: Run Compiler
run: yarn compiler run: pnpm compiler
- name: Publish Package - name: Publish Package
run: | run: |

View File

@ -20,8 +20,8 @@ jobs:
- name: Install Dependencies and Build Docs - name: Install Dependencies and Build Docs
run: | run: |
yarn install pnpm install
yarn build:docs pnpm build:docs
- name: Setup Aliyun OSS - name: Setup Aliyun OSS
uses: manyuanrong/setup-ossutil@master uses: manyuanrong/setup-ossutil@master

View File

@ -50,5 +50,5 @@ jobs:
- name: upload - name: upload
run: | run: |
npm i uni-mini-ci -g npm i uni-mini-ci -g
yarn install pnpm install
yarn upload:mp-weixin pnpm upload:mp-weixin

3
.npmrc Normal file
View File

@ -0,0 +1,3 @@
registry=https://registry.npmmirror.com/
engine-strict=true
strict-peer-dependencies=false

View File

@ -8,7 +8,7 @@
// "editor.formatOnSave": true, // "editor.formatOnSave": true,
// #eslint // #eslint
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": "explicit"
}, },
// vue // vue
"eslint.validate": [ "eslint.validate": [

View File

@ -1,10 +1,10 @@
/* /*
* @Author: weisheng * @Author: weisheng
* @Date: 2022-11-01 17:12:57 * @Date: 2022-11-01 17:12:57
* @LastEditTime: 2023-10-31 21:36:16 * @LastEditTime: 2024-01-01 22:23:31
* @LastEditors: weisheng * @LastEditors: weisheng
* @Description: 组件发版问答 * @Description: 组件发版问答
* @FilePath: \wot-design-uni\build\release.js * @FilePath: /wot-design-uni/build/release.js
* 记得注释 * 记得注释
*/ */
const inquirer = require('inquirer') const inquirer = require('inquirer')
@ -39,16 +39,16 @@ inquirer
// 项目版本更新 // 项目版本更新
switch (answers['version']) { switch (answers['version']) {
case '🐛 patch 小版本': case '🐛 patch 小版本':
execSync('yarn release-patch') execSync('pnpm release-patch')
break break
case '✨ minor 中版本': case '✨ minor 中版本':
execSync('yarn release-minor') execSync('pnpm release-minor')
break break
case '🚀 major 大版本': case '🚀 major 大版本':
execSync('yarn release-major') execSync('pnpm release-major')
break break
default: default:
execSync('yarn release-minor') execSync('pnpm release-minor')
break break
} }
// 生成日志 // 生成日志
@ -62,7 +62,7 @@ inquirer
package.version = version package.version = version
writeFileSync(path.resolve(src, 'package.json'), JSON.stringify(package)) writeFileSync(path.resolve(src, 'package.json'), JSON.stringify(package))
// 生成制品 // 生成制品
execSync('yarn lint') execSync('pnpm lint')
execSync('git add -A ') execSync('git add -A ')
execSync(`git commit -am "build: compile ${version}"`) execSync(`git commit -am "build: compile ${version}"`)
execSync(`git tag -a v${version} -am "chore(release): ${version}"`) execSync(`git tag -a v${version} -am "chore(release): ${version}"`)

View File

@ -42,6 +42,7 @@
"docs:serve": "vitepress serve docs", "docs:serve": "vitepress serve docs",
"dev:docs": "vitepress dev docs --port 5174", "dev:docs": "vitepress dev docs --port 5174",
"build:docs": "npm run build:h5 && vitepress build docs && node build/demoCopy.js", "build:docs": "npm run build:h5 && vitepress build docs && node build/demoCopy.js",
"preinstall": "npx only-allow pnpm",
"prepare": "husky install", "prepare": "husky install",
"lint": "eslint --fix --ext .js,.vue,.ts src", "lint": "eslint --fix --ext .js,.vue,.ts src",
"commit": "git-cz", "commit": "git-cz",

10464
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

8625
yarn.lock

File diff suppressed because it is too large Load Diff