From 1d06a6aef3391be4669aafa064e60a947e592c09 Mon Sep 17 00:00:00 2001 From: Justin Beckwith Date: Sun, 10 Feb 2019 19:27:13 -0800 Subject: [PATCH] build: create docs test npm scripts --- .kokoro/docs.sh | 10 +--------- package.json | 7 +++++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.kokoro/docs.sh b/.kokoro/docs.sh index ea6e514f4..a4f318794 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 640025afd..3f9ec9ab1 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,9 @@ "prepare": "npm run compile", "pretest": "npm run compile", "proto": "npm run proto:pubsub", - "proto:pubsub": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/pubsub/v1/pubsub.proto | pbts -o proto/pubsub.d.ts -" + "proto:pubsub": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/pubsub/v1/pubsub.proto | pbts -o proto/pubsub.d.ts -", + "docs-test": "blcl docs -r --exclude www.googleapis.com", + "predocs-test": "npm run docs" }, "dependencies": { "@google-cloud/paginator": "^0.1.0", @@ -96,6 +98,7 @@ "sinon": "^7.1.1", "source-map-support": "^0.5.9", "typescript": "~3.3.0", - "uuid": "^3.1.0" + "uuid": "^3.1.0", + "broken-link-checker-local": "^0.2.0" } }