From e1a40da357660a3fc039b2a59f089c52a8a5ece0 Mon Sep 17 00:00:00 2001 From: Jonathan Lui Date: Tue, 8 Jan 2019 19:06:41 -0800 Subject: [PATCH] build: check broken links in generated docs (#175) --- packages/google-cloud-videointelligence/.jsdoc.js | 2 +- packages/google-cloud-videointelligence/package.json | 2 +- packages/google-cloud-videointelligence/src/index.js | 5 +---- packages/google-cloud-videointelligence/synth.py | 10 ++++++++++ 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/google-cloud-videointelligence/.jsdoc.js b/packages/google-cloud-videointelligence/.jsdoc.js index 485527b95ff..6751e0d9efd 100644 --- a/packages/google-cloud-videointelligence/.jsdoc.js +++ b/packages/google-cloud-videointelligence/.jsdoc.js @@ -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/' diff --git a/packages/google-cloud-videointelligence/package.json b/packages/google-cloud-videointelligence/package.json index 96fcf8e3d4b..31324a99327 100644 --- a/packages/google-cloud-videointelligence/package.json +++ b/packages/google-cloud-videointelligence/package.json @@ -51,7 +51,7 @@ "eslint-config-prettier": "^3.0.0", "eslint-plugin-node": "^8.0.0", "eslint-plugin-prettier": "^3.0.0", - "ink-docstrap": "^1.3.2", + "jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git", "intelli-espower-loader": "^1.0.1", "jsdoc": "^3.5.5", "mocha": "^5.2.0", diff --git a/packages/google-cloud-videointelligence/src/index.js b/packages/google-cloud-videointelligence/src/index.js index 7de45c3062d..c6928ebff16 100644 --- a/packages/google-cloud-videointelligence/src/index.js +++ b/packages/google-cloud-videointelligence/src/index.js @@ -12,9 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -/** - * @namespace google - */ /** * @namespace google.protobuf */ @@ -22,7 +19,7 @@ * @namespace google.rpc */ /** - * @namespace google.cloud + * @namespace google.longrunning */ /** * @namespace google.cloud.videointelligence diff --git a/packages/google-cloud-videointelligence/synth.py b/packages/google-cloud-videointelligence/synth.py index 479ad088f28..c82da634984 100644 --- a/packages/google-cloud-videointelligence/synth.py +++ b/packages/google-cloud-videointelligence/synth.py @@ -31,6 +31,16 @@ templates = common_templates.node_library() s.copy(templates) +# [START fix-dead-link] +s.replace('**/doc/google/protobuf/doc_timestamp.js', + 'https:\/\/cloud\.google\.com[\s\*]*http:\/\/(.*)[\s\*]*\)', + r"https://\1)") + +s.replace('**/doc/google/protobuf/doc_timestamp.js', + 'toISOString\]', + 'toISOString)') +# [END fix-dead-link] + # Node.js specific cleanup subprocess.run(["npm", "install"]) subprocess.run(["npm", "run", "fix"])