Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add generate:types command to lint-staged #1029

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bluwy
Copy link
Member

@bluwy bluwy commented Nov 21, 2024

No description provided.

@@ -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 && :"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This separate command was needed as lint-staged will passed changed files to the command by default, and the : will toss them away. Don't know if Windows will be happy about this though.

I can't inline this directly into lint-staged, it seems to not like the &&.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, can you consume the input in the generate script instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean putting the && : directly in generate:types instead? Yeah that works too if you're ok with that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, i meant putting it in a node script that handles it, calling dts-buddy from there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That feels like a more complicated setup imo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants