source-academy/modules

Build process's flag does not actually skip HTML documentation

Cloud7050 opened this issue · 2 comments

When building modules with yarn scripts build modules, appending the --no-html flag does not actually appear to prevent the building of HTML documentation. The flag is documented in the code as part of the command's help text, and the code does still test for its presence.

With the flag specified, it will first log "Not building HTML documentation". Or, if the entire build/documentation/ folder was deleted, it will instead log "Building HTML Documentation".

New HTML documentation is then overwritten into the relevant folder.

At the end, when logging all timings, it logs something like "HTML Documentation built successfully in 4.28s".

shouldBuildHtml() resolves to htmlOpts, which is passed to logHtmlStart(), but buildHtml() appears to run regardless without receiving or using those options, and finally ends with logHtmlResult() on the real results.

A more general observation is that the opening log can sometimes say that documentation won't be built, while the closing log reporting the real results can end up showing that documentation was actually built in x time. For example, when building twice in a row without any file changes, and looking at the logs of the second build.

Obsolete via merging #163