Skip to content

Commit

Permalink
fix: 修复husky命令
Browse files Browse the repository at this point in the history
  • Loading branch information
mengqiuleo committed Nov 4, 2024
1 parent 757b985 commit eced544
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
npx lint-staged
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm run lint:lint-staged
8 changes: 2 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,19 @@
"scripts": {
"test": "jest --bail",
"prepare": "husky install",
"lint:lint-staged": "lint-staged",
"build": "node scripts/build.js",
"change": "changeset add",
"change:version": "changeset version",
"release": "pnpm build && pnpm release:only",
"release:only": "changeset publish",
"gen-doc": "node scripts/generateApiDoc.js"
},
"husky": {
"hooks": {
"lint-staged": "npx lint-staged"
}
},
"lint-staged": {
"packages/**/*.test.ts": [
"pnpm run test"
],
"packages/**/README.md": [
"packages/*/README.md": [
"pnpm run gen-doc"
]
}
Expand Down
4 changes: 3 additions & 1 deletion scripts/generateApiDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ sourceFiles.forEach(sourceFile => {
const definedData = getDefinedData(sourceFile)

writeDefinedDataToReadme(definedData, readmePath)
})
})

console.log('generate api doc success🚀')

0 comments on commit eced544

Please sign in to comment.