Previously the generated files were cleaned out before
doc-gen began (via a yarn pre-script). This can cause a
race condition in the CLI server, which prevents the new
generated files from being picked up.
Now we delay the cleaning until the last minute to ensure
that they ar still picked up by the webpack server.
PR Close#21540
This is to tidy up the `author-packagse`, which currently duplicates a
lot of the configuration in the main packages. We need to
DRY this up so that we don't fall foul of a change in one being missed in
the other.
Now if you specifically provide an empty `@title` tag
for a contents file, the doc-gen will not complain and
the browser will just display a reasonable default.
Documents can specify their title via the `title` or `name` jsdoc tags.
This change adds that, if neither are provided, the first `<h1>` element
is removed from the `renderedContent` and used for the title.
If there is still no title then it is set to the empty string and a warning
is logged.