Closed RedYetiDev closed 5 days ago
Thanks for the approvals! Once this lands, I'll be able to implement it with https://github.com/nodejs/node/pull/55268, which will really bring the new man-page generator into the core :-)!
cc @ovflowd
Alrighty, I'm back 👋
So pretty much my idea here is:
Instead of exporting an one does everything function, cli.js should still do exactly what it is doing, parsing cli args and doing whatever it needs to be done to be able to run from the CLI.
On index.js simply only export all the functions that exist on the other modules. My reasoning is that by exporting this nebulous function it creates a black box and prevents people from actually importing each module.
Hence on node core you'll simply import the exports of this package and create your own instance of whatever you need, which allows you even to make it specific for the needs of man doc gen.
Also don't forget to update package.json so that only the index.mjs file is exported on the module.
How do you feel about this?
Thanks for your feedback. I've updated this to just export the other files. PTAL when you get a chance :-)
Thank you, @RedYetiDev and apologies for blocking you!
Description
This PR adds the ability to execute this from another JS file, without the use of the CLI. That way,
man-page
, and any future generators wouldn't be limited to the CLI for executionValidation
Verify that all execution is working as planned.
Check List