Skip to content

doc, tools: refactor html generation

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc, tools

Description of change

I was picking up the guides generation from https://github.com/nodejs/node/pull/5408. While doing this I moved forward without using another external dependency. To re-use the html-path entirely wouldn't have been possible. So I refactored this to be more modular in style, and will continue to just introduce "target flags" guide < > html and branching components accordingly.

Also a rather critical thing is, that up until this PR HTML generation was done via piping over stdout. I have refactored this to make a call to fs.writeFile(). This also leads to a increase possibly.

cc @nodejs/documentation

Merge request reports

Loading