From 336967586e4c71d8d716d1696b613aa56efe9a33 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Fri, 2 Feb 2024 06:02:07 -0500 Subject: [PATCH] test:all should also check/fix format --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index afdfe322e..2bece8559 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ "_cd:docs": "cd userguide &&", "_check:format": "npx prettier --check .??* *.md", "_cp:bs-rfs": "npx cpy 'node_modules/bootstrap/scss/vendor/*' assets/_vendor/bootstrap/scss/", + "_diff:check": "git diff --name-only --exit-code", + "_diff:fail": "git diff --name-only --exit-code || exit 1", "_mkdir:hugo-mod": "npx mkdirp ../github.com/FortAwesome/Font-Awesome ../github.com/twbs/bootstrap", "_prebuild": "npm run _cp:bs-rfs", "_test:docs": "npm run cd:docs test", @@ -29,7 +31,7 @@ "preserve": "npm run _prebuild", "pretest": "npm run _prebuild", "serve": "npm run cd:docs serve", - "test:all": "npm run _test:docs && npm run check", + "test:all": "npm run _test:docs && npm run check && npm run fix:format && npm run _diff:fail", "test": "npm run _test:docs", "update:pkg:dep": "npm install --save-exact @fortawesome/fontawesome-free@latest bootstrap@latest", "update:pkg:hugo": "npm install --save-exact -D hugo-extended@latest"