From 67d43a06115f901a41c0ecb9bb9c4a8dbe194250 Mon Sep 17 00:00:00 2001 From: novlan1 <1576271227@qq.com> Date: Sat, 8 Oct 2022 11:48:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=86=99=E5=85=A5npmrc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .npmrc | 1 - package.json | 3 ++- script/npm-token.js | 3 +++ 4 files changed, 6 insertions(+), 2 deletions(-) delete mode 100644 .npmrc create mode 100644 script/npm-token.js diff --git a/.gitignore b/.gitignore index e2fe550e..c2e7d9d6 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,4 @@ repo/ ignore-tmp-data/ +.npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 214c29d1..00000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -registry=https://registry.npmjs.org/ diff --git a/package.json b/package.json index 082c28f5..e48010a8 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,8 @@ "lint:fix": "eslint --fix --ext .js,.ts,.tsx,.jsx,.vue .", "changelog": "gulp changelog", "version": "yarn changelog && git add CHANGELOG.md", - "release": "yarn test && yarn build && np --no-cleanup --yolo --any-branch", + "release": "yarn npm:token && yarn test && yarn build && np --no-cleanup --yolo --any-branch", + "npm:token": "node script/npm-token.js", "prepare": "husky install" }, "devDependencies": { diff --git a/script/npm-token.js b/script/npm-token.js new file mode 100644 index 00000000..44474b60 --- /dev/null +++ b/script/npm-token.js @@ -0,0 +1,3 @@ +const { writeEnvTokenToNpmRC } = require('../lib/index'); + +writeEnvTokenToNpmRC();