diff --git a/.kokoro/docs.sh b/.kokoro/docs.sh index ea6e514f45d..a4f318794e6 100755 --- a/.kokoro/docs.sh +++ b/.kokoro/docs.sh @@ -22,12 +22,4 @@ cd $(dirname $0)/.. npm install -npm run docs - -# Check broken links -BIN=./node_modules/.bin - -npm install broken-link-checker -npm install http-server -$BIN/http-server -p 8080 docs/ & -$BIN/blc http://localhost:8080 -r --exclude www.googleapis.com +npm run docs-test diff --git a/package.json b/package.json index a29010eec1b..21757d3c45c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,9 @@ "fix": "eslint --fix '**/*.js' && gts fix", "pregenerate": "npm run build-tools", "generate": "node build/src/generator/generate.js", - "postgenerate": "npm run fix" + "postgenerate": "npm run fix", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "author": "Google Inc.", "keywords": [ @@ -97,6 +99,7 @@ "server-destroy": "^1.0.1", "source-map-support": "^0.5.5", "tmp": "^0.0.33", - "typescript": "~3.3.0" + "typescript": "~3.3.0", + "broken-link-checker-local": "^0.2.0" } }