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
This commit is contained in:
Peter Bacon Darwin 2017-10-30 21:29:25 +00:00 committed by Victor Berchet
parent 1beab0da6a
commit 068348e9b1
1 changed files with 9 additions and 1 deletions

View File

@ -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();
}