Skip to content

Commit

Permalink
test commit husky
Browse files Browse the repository at this point in the history
  • Loading branch information
notbucai committed Nov 11, 2021
1 parent a2c5d00 commit c5f4ea8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@
"publish": "yarn publish",
"website:dev": "webpack server --config ./website/webpack.config.js",
"rollup:dev": "rollup --config ./build/rollup.config.js --watch --sourcemap",
"lint-fix": "eslint --fix .",
"lint": "eslint .",
"preinstall": "npx only-allow yarn",
"pretest": "npx only-allow yarn",
"prewebsite:dev": "npx only-allow yarn",
"prerollup:dev": "npx only-allow yarn",
"lint-fix": "eslint --fix ."
"prepublishOnly": "node prepublish.js",
"prepare":"husky install"
},
"devDependencies": {
"@babel/core": "^7.15.0",
Expand Down Expand Up @@ -73,6 +76,7 @@
"flush-promises": "^1.0.2",
"highlight.js": "^11.2.0",
"html-webpack-plugin": "^5.3.2",
"husky": "^7.0.4",
"jest": "^26",
"markdown-it-anchor": "^8.1.2",
"markdown-it-chain": "^1.3.0",
Expand Down
14 changes: 14 additions & 0 deletions prepublish.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* @Author: bucai<1450941858@qq.com>
* @Date: 2021-08-18 10:04:40
* @LastEditors: bucai<1450941858@qq.com>
* @LastEditTime: 2021-11-11 19:46:27
* @Description: 发布专用脚本
*/
// 流程
// 0. 确认是否发布
// 1. 确认版本
// 2. eslint
// 3. build
// 4. publish
// 5. commit tag
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5219,6 +5219,11 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==

husky@^7.0.4:
version "7.0.4"
resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==

iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down

0 comments on commit c5f4ea8

Please sign in to comment.