Open cmoulliard opened 7 years ago
bucharest-gold/entente#133
+1 to this
Here we have another example which also the commands are separated: https://github.com/nodeshift-archived/license-reporter/tree/main/lib
commands
, modules
(let's say the real business logic) and utils
(that includes most of the cross-cutting and peripherals features like validation, reports, messages, etc)
I'll probably take a look on this , but we need other things first. also yargs helped me with this kind of split of responsibilities in the code so probably we can also move from commander to yargs -- it scans a directory which contains commands https://github.com/nodeshift-archived/license-reporter/blob/main/bin/license-reporter#L11
Here is an example of a project comparable to litoria where the rendering is done using a plugin (asciidoc, markdown, ...) & where a command pattern is used to inject the fields (metadata, files, object). The plugins are registered using an Api
& by consequence, the client is less verbose to develop/maintain as the process to be called correspond to one of the plugins to be used (pdf, asciidoc, ...)
https://github.com/metalsmith/metalsmith/blob/master/bin/_metalsmith