From 068348e9b1010f6a0f664fd74b2205cb2cf8c475 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Mon, 30 Oct 2017 21:29:25 +0000 Subject: [PATCH] build(aio): do not fail the initial doc-gen when running docs-watch Checks that cause the doc-gen to fail were already disabled in `docs-watch` for the doc-gen that runs when a file is changed. Now these checks are also disabled for the initial doc-gen run. closes #20038 --- aio/tools/transforms/authors-package/watchr.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/aio/tools/transforms/authors-package/watchr.js b/aio/tools/transforms/authors-package/watchr.js index 9d28225102..70982f43dc 100644 --- a/aio/tools/transforms/authors-package/watchr.js +++ b/aio/tools/transforms/authors-package/watchr.js @@ -29,7 +29,15 @@ if (process.argv.indexOf('--watch-only') === -1) { console.log('Skip the full doc-gen by running: `yarn docs-watch --watch-only`'); console.log('================================================================'); const {Dgeni} = require('dgeni'); - var dgeni = new Dgeni([require('../angular.io-package')]); + const dgeni = new Dgeni([require('../angular.io-package')]); + + // Turn off all the potential failures for this doc-gen one-off run. + // This enables authors to run `docs-watch` while the docs are still in an unstable state. + const injector = dgeni.configureInjector(); + injector.get('linkInlineTagDef').failOnBadLink = false; + injector.get('checkAnchorLinksProcessor').$enabled = false; + injector.get('renderExamples').ignoreBrokenExamples = true; + p = dgeni.generate(); }