Skip to content

Validate markdown before source build - #4307

Closed
handrews wants to merge 1 commit into
OAI:devfrom
handrews:val-build
Closed

Validate markdown before source build#4307
handrews wants to merge 1 commit into
OAI:devfrom
handrews:val-build

Conversation

@handrews

Copy link
Copy Markdown
Member

idk about y'all but the chances of me remembering to run two commands instead of one is a lot smaller than the chances of me remembering to do one.

Let's have the src (but not production!) build run markdown validation as a pre-check. Any reason not to?

@handrewshandrews added the script Pull requests that update Bash or JavaScript code label Jan 16, 2025
@handrews
handrews requested review from a team as code ownersJanuary 16, 2025 22:41

# run this script from the root of the repo

npm run validate-markdown || exit -1

@ralfhandlralfhandlJan 17, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think of npm scripts as a layer on top of bash or JS scripts and would rather extend the build-src script in package.json to

"build-src": "npm run validate && bash bash ./scripts/md2html/build-src.sh",

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

@handrews that works for me, although I think you only want one bash... or is there also supposed to be a bash before npm run validate? Either way I'll take this down and either you or I can post a PR with this approach.

@ralfhandlralfhandl mentioned this pull request Jan 18, 2025
2 tasks
@handrews
handrews deleted the val-build branch June 19, 2025 17:20
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scriptPull requests that update Bash or JavaScript code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants

@handrews@ralfhandl