From cde67e1be284e898a0d8cc02f04291c9e26850be Mon Sep 17 00:00:00 2001 From: Ralf Handl Date: Sat, 18 Jan 2025 10:33:42 +0100 Subject: [PATCH] validate markdown in build-src --- CONTRIBUTING.md | 8 +++----- package.json | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f6c33f06b1..12ebf89c21 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -171,12 +171,10 @@ To do this locally, please 1. Install [Node.js](https://nodejs.org/) 2. Check out this repo, go to the repo root, and switch to a development branch 3. Execute `npm install` (once, repeat after merging upstream changes) -4. Execute `npm run build-src` after changing `src/oas.md` -5. Open output file `deploy-preview/oas.html` with a browser +4. Execute `npm run build-src` after changing `src/oas.md` (this first executes `npm run validate-markdown`, which can also be run separately) +5. Open output file `deploy-preview/oas.html` with a browser and check your changes -Before creating a pull request or marking a draft pull request as ready for review, please - -6. Execute `npm run validate-markdown` and fix any reported problems in `src/oas.md` +Please make sure the markdown validates and builds using the above steps before creating a pull request or marking a draft pull request as ready for review. ## Reviewers diff --git a/package.json b/package.json index da823d1fcc..6dc5dbc9a5 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "license": "Apache-2.0", "scripts": { "build": "bash ./scripts/md2html/build.sh", - "build-src": "bash ./scripts/md2html/build-src.sh", + "build-src": "npm run validate-markdown && bash ./scripts/md2html/build-src.sh", "test": "c8 --100 vitest --watch=false && bash scripts/schema-test-coverage.sh", "validate-markdown": "npx mdv src/oas.md && npx markdownlint-cli src/oas.md" },