Skip to content

Commit f5fe862

Browse files
azuclaude
andcommitted
fix: use prepublishOnly and explicit build in pretest
- Replace prepare script with prepublishOnly for npm publish - Add explicit build to pretest script before running tests - Keep prepare script for git hooks only - Avoids unnecessary builds on every pnpm install 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f99bfad commit f5fe862

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
"scripts": {
2727
"build": "textlint-scripts build",
2828
"watch": "textlint-scripts build --watch",
29-
"pretest": "node tool/create-fixtures.js",
29+
"prepublishOnly": "npm run --if-present build",
30+
"pretest": "npm run build && node tool/create-fixtures.js",
3031
"test": "textlint-scripts test && npm run test:textlint",
3132
"test:textlint": "(cd example && pnpm install && npm test)",
3233
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
33-
"prepare": "git config --local core.hooksPath .githooks && npm run --if-present build"
34+
"prepare": "git config --local core.hooksPath .githooks"
3435
},
3536
"keywords": [
3637
"textlint",

0 commit comments

Comments
 (0)