From 0fda288c225516cf0a7a70ac82ce0dbd9f8b913d Mon Sep 17 00:00:00 2001 From: LiuJiaNan <15703339975@163.com> Date: Mon, 24 Aug 2026 08:45:00 +0800 Subject: [PATCH] =?UTF-8?q?chore(release):=20=E6=9B=B4=E6=96=B0=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E8=84=9A=E6=9C=AC=E5=B9=B6=E4=BF=AE=E6=94=B9.gitignor?= =?UTF-8?q?e=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在.gitignore中添加了_virtual目录,防止虚拟文件被提交 - 在package.json的scripts中添加prepublishOnly脚本确保发布前构建 - 将publish脚本重命名为release以提高语义清晰度 - 保持postinstall脚本提醒用户使用库的感谢信息 --- .gitignore | 1 + package.json | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 523b377..ed9db95 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ /enum/ /json/ /css/ +_virtual # IDE .idea diff --git a/package.json b/package.json index 56c6108..4439ca4 100644 --- a/package.json +++ b/package.json @@ -22,9 +22,10 @@ "scripts": { "build": "rollup -c", "build:watch": "rollup -c -w", + "prepublishOnly": "npm run build", "patch": "npm version patch", "minor": "npm version minor", - "publish": "npm publish", + "release": "npm publish", "postinstall": "echo 'Thanks for using our component library!'" }, "dependencies": {