Skip to content

Commit

Permalink
Run frontmatter-validatior as part of make-run
Browse files Browse the repository at this point in the history
Install its dependencies when running make-install
  • Loading branch information
fabianrbz committed Nov 26, 2024
1 parent 22b3789 commit ef552ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ install-prerequisites:
install: ruby-version-check
npm ci
bundle install
cd tools/frontmatter-validator
npm ci

validate-frontmatters:
npm --prefix tools/frontmatter-validator run validate

# Using local dependencies, starts a doc site instance on http://localhost:4000.
run: ruby-version-check
run: ruby-version-check validate-frontmatters
netlify dev

run-debug: ruby-version-check
Expand All @@ -42,4 +47,5 @@ kill-ports:
@VITE_PROCESS=$$(lsof -ti:3036) && kill -9 $$VITE_PROCESS || true

vale:
-git diff --name-only --diff-filter=d HEAD | grep '\.md$$' | xargs vale
-git diff --name-only --diff-filter=d HEAD | grep '\.md$$' | xargs vale

3 changes: 2 additions & 1 deletion tools/frontmatter-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"validate": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
Expand Down

0 comments on commit ef552ba

Please sign in to comment.