Skip to content

Commit

Permalink
build: check broken links in generated docs (#175)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwlui authored and JustinBeckwith committed Jan 9, 2019
1 parent 33abda2 commit e1a40da
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-videointelligence/.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
2 changes: 1 addition & 1 deletion packages/google-cloud-videointelligence/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 1 addition & 4 deletions packages/google-cloud-videointelligence/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @namespace google
*/
/**
* @namespace google.protobuf
*/
/**
* @namespace google.rpc
*/
/**
* @namespace google.cloud
* @namespace google.longrunning
*/
/**
* @namespace google.cloud.videointelligence
Expand Down
10 changes: 10 additions & 0 deletions packages/google-cloud-videointelligence/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

0 comments on commit e1a40da

Please sign in to comment.