Skip to content

Commit

Permalink
build: check broken links in generated docs (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwlui authored and JustinBeckwith committed Jan 9, 2019
1 parent b7808ff commit 5fdbabb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 7 deletions.
10 changes: 10 additions & 0 deletions .compodocrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
tsconfig: ./tsconfig.json
output: ./docs
theme: material
hideGenerator: true
disablePrivate: true
disableProtected: true
disableInternal: true
disableCoverage: true
disableGraph: true
2 changes: 1 addition & 1 deletion .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/ink-docstrap/template',
template: './node_modules/jsdoc-baseline',
recurse: true,
verbose: true,
destination: './docs/'
Expand Down
8 changes: 8 additions & 0 deletions .kokoro/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,11 @@ 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 -r http://localhost:8080
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ store.delete('key', () => {});

#### datastore

A [@google-cloud/datastore](https://googlecloudplatform.github.io/google-cloud-node/#/docs/datastore/latest/datastore) instance.
A [@google-cloud/datastore](https://cloud.google.com/nodejs/docs/reference/datastore/latest/Datastore) instance.

### kvstore#delete(key, callback)

Expand All @@ -71,7 +71,7 @@ Type: `String|Number`

#### callback
Type: `Function`
Executed with the same signature as [Datastore#delete](https://googlecloudplatform.github.io/google-cloud-node/#/docs/datastore/latest/datastore?method=delete).
Executed with the same signature as [Datastore#delete](https://cloud.google.com/nodejs/docs/reference/datastore/latest/Datastore#delete).

### kvstore#get(key, callback)

Expand All @@ -92,7 +92,7 @@ Type: `*`

#### callback
Type: `Function`
Executed with the same signature as [Datastore#save](https://googlecloudplatform.github.io/google-cloud-node/#/docs/datastore/latest/datastore?method=save).
Executed with the same signature as [Datastore#save](https://cloud.google.com/nodejs/docs/reference/datastore/latest/Datastore#save).


## Credit
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build/src"
],
"scripts": {
"docs": "echo no docs 👻",
"docs": "compodoc src/",
"lint": "eslint '**/*.js' && gts check",
"test": "nyc mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
Expand All @@ -33,6 +33,7 @@
"author": "Stephen Sawchuk",
"license": "MIT",
"devDependencies": {
"@compodoc/compodoc": "^1.1.7",
"@google-cloud/datastore": "^2.0.0",
"@types/mocha": "^5.2.5",
"@types/node": "^10.5.6",
Expand All @@ -42,9 +43,7 @@
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-prettier": "^3.0.0",
"gts": "^0.9.0",
"ink-docstrap": "^1.3.2",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"mocha": "^5.2.0",
"nyc": "^13.0.0",
"power-assert": "^1.6.0",
Expand Down

0 comments on commit 5fdbabb

Please sign in to comment.