diff --git a/package.json b/package.json index b8cfe61ced..3a3e694daa 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "lint:md": "remark . -f -q", "lint:style": "ts-node --project tsconfig.node.json scripts/check-cssinjs", "lint:script": "eslint . --ext .js,.jsx,.ts,.tsx --cache", - "pre-publish": "npm run test-all -- --skip-build", + "pre-publish": "npm run test-all -- --skip-build && node ./scripts/pre-publish-notice.js", "prettier": "prettier -c --write **/* --cache", "pub": "npm run version && npm run collect-token-statistic && npm run token-meta && antd-tools run pub", "rome:format": "rome format --write .", @@ -245,6 +245,7 @@ "lodash": "^4.17.21", "lz-string": "^1.4.4", "mockdate": "^3.0.0", + "node-notifier": "^10.0.1", "open": "^8.4.2", "prettier": "^2.3.2", "prettier-plugin-jsdoc": "^0.4.2", diff --git a/scripts/pre-publish-notice.js b/scripts/pre-publish-notice.js new file mode 100644 index 0000000000..42a3f21352 --- /dev/null +++ b/scripts/pre-publish-notice.js @@ -0,0 +1,9 @@ +const { Notification } = require('node-notifier'); + +new Notification().notify({ + title: '✅ 准备发布到 npm', + message: '测试用例执行完毕,马上就要输入 npm 校验码了!', + sound: true, +}); + +process.exit(0);