Skip to content

Commit 7d9f77f

Browse files
build: create docs test npm scripts (#328)
1 parent 8a99d56 commit 7d9f77f

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.kokoro/docs.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,4 @@ cd $(dirname $0)/..
2222

2323
npm install
2424

25-
npm run docs
26-
27-
# Check broken links
28-
BIN=./node_modules/.bin
29-
30-
npm install broken-link-checker
31-
npm install http-server
32-
$BIN/http-server -p 8080 docs/ &
33-
$BIN/blc http://localhost:8080 -r --exclude www.googleapis.com
25+
npm run docs-test

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
"prepare": "npm run compile",
4040
"pretest": "npm run compile",
4141
"proto": "npm run proto:datastore",
42-
"proto:datastore": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/datastore/v1/datastore.proto | pbts -o proto/datastore.d.ts -"
42+
"proto:datastore": "mkdir -p proto && pbjs -t static-module -w commonjs -p node_modules/google-proto-files google/datastore/v1/datastore.proto | pbts -o proto/datastore.d.ts -",
43+
"docs-test": "blcl docs -r --exclude www.googleapis.com",
44+
"predocs-test": "npm run docs"
4345
},
4446
"dependencies": {
4547
"@google-cloud/projectify": "^0.3.2",
@@ -82,6 +84,7 @@
8284
"prettier": "^1.13.5",
8385
"proxyquire": "^2.0.1",
8486
"sinon": "^7.0.0",
85-
"typescript": "~3.3.0"
87+
"typescript": "~3.3.0",
88+
"broken-link-checker-local": "^0.2.0"
8689
}
8790
}

0 commit comments

Comments
 (0)