-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[Build Tooling]: Fix pre commit hook to build block docs #37613
Conversation
Size Change: 0 B Total Size: 1.13 MB ℹ️ View Unchanged
|
40940c7
to
08237e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can’t test it right now but the changes proposed look reasonable based on the explanation provided 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was able to reproduce the issue on the trunk, and the fix works as expected 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have I mentioned how much I hate tooling in the Node ecosystem? 😬
Anyway, looks good, makes sense, and fixes it for me.
Thanks @ntsekouras for fixing, looks good. I thought I had it tested and working but 🤷♂️ |
Update lint-staged to command to run script to generate theme.json reference prior to checking for changed files. For details fixing similar issue see PR #37613
* Initial script to generate settings and style for theme.json * Add to table of contents and link to how to guide - Adds a brief paragraph at top of reference guide linking to how to guide for examples - Adds reference guide to table of contents / manifest * Add markdownDescription for appearanceTools To enrich the automated docs this adds a markdownDescription field for appearanceTools to explain what tools are enabled. You can see the markdownDescription field used in the tsconfig schema here: http://json.schemastore.org/tsconfig * Add support for markdownDescription in generated docs * Update generated docs. * Dont use markdownDescription yet, move rich description to description field. * Remove markdownDescription field * Change doc scripts trigger for pre-commit Update lint-staged to command to run script to generate theme.json reference prior to checking for changed files. For details fixing similar issue see PR #37613
I don't know if it's just me and is specific to some environment params but I can't commit anything. The error is something like that:
What happens here is that we have a pre commit hook that runs npm-run-all api-docs:* but
lint-staged
passes full paths to staged changes so in combination with thenpm-run-all
, we end up trying to match atask
from eachstaged file
.In this PR I removed the
npm-run-all
command to avoid the above issue and also changed theTOKEN
for core blocks documentation in order to be notified by theare-api-docs-unstaged.js
here, which is run right afterwards.Testing instructions
block.json
- let's say add an attribute and observe that it will not let you because of the updated docs