Skip to content

Commit 6d03f2e

Browse files
committed
Added npm script for 404 checking.
1 parent c1a0a86 commit 6d03f2e

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
_book
33
node_modules/
44
book.pdf
5-
book.epub
5+
book.epub
6+
.logs

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"book:publish:github": "gh-pages -d _book",
1515
"book:publish:mirror": "gh-pages -d _book -o mirror",
1616
"test:404": "npm run _test:404 --silent",
17-
"_test:404": "blcl ./_book -ro; exit 0"
17+
"_test:404": "/bin/sh ./scripts/404-test.sh"
1818
},
1919
"author": "",
2020
"license": "MIT",

scripts/404-test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /bin/bash
2+
3+
mkdir .logs 2> /dev/null
4+
blcl ./_book -ro > ./.logs/log.txt
5+
grep broken .logs/log.txt
6+
echo "Detailed results in /.logs"

0 commit comments

Comments
 (0)