ch007m / litoria

Command Line Tool to manage asciidoc projet (create, watch content), convert adoc into html, pdf & epub3 for doc, reports, revealjs slideshow, hands on lab & more
0 stars 3 forks source link

Adopt a more pluggable approach #10

Open cmoulliard opened 7 years ago

cmoulliard commented 7 years ago

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

helio-frota commented 7 years ago

bucharest-gold/entente#133

helio-frota commented 1 year ago

+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)

helio-frota commented 1 year ago

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