From ec158f8e11a285ac793c4d9f7de27fb402ada64f Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Mon, 25 Nov 2024 18:05:26 +0800 Subject: [PATCH] chore: add (#1029) --- .husky/pre-commit | 1 + package.json | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 66e8aabd5..3ec797055 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,2 @@ pnpm lint-staged --concurrent false +git add packages/*/types/* diff --git a/package.json b/package.json index d98f0ae1c..64dc147ad 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,8 @@ "release": "pnpm changeset publish", "prepare": "husky", "playwright": "playwright-core", - "generate:types": "pnpm --filter \"./packages/*\" --parallel generate:types" + "generate:types": "pnpm --filter \"./packages/*\" --parallel generate:types", + "generate:types-staged": "pnpm generate:types && :" }, "devDependencies": { "@changesets/cli": "^2.27.10", @@ -58,9 +59,8 @@ }, "lint-staged": { "*.{js,ts,svelte,html,md,svx}": "eslint --cache --fix", - "*": [ - "prettier --cache --ignore-path .gitignore --ignore-unknown --write" - ] + "*": "prettier --cache --ignore-path .gitignore --ignore-unknown --write", + "packages/*/src/**/*": "pnpm generate:types-staged" }, "packageManager": "pnpm@9.14.2", "engines": {