Skip to content

simplification of command classes #33

@esatterwhite

Description

@esatterwhite

Seeli is the first node package I wrote probably 10 years go and it has accumulated a bit of cruft over the years. The way I want to use it has changed over the years and some of the initial decisions on implementation are getting rather difficult to work around

  • expectations around command instances are difficult to test
  • The sub command interface is difficult to juggle and interferes with trying to programmatically execute a command
  • The explicit use of console.log make it difficult to test + stub a writable destination
  • The config interface can cause some when loading order isn't respected
    • The dynamic loading of the help command may get the wrong color / name if loaded too soon
  • The attempt at deep merging of options is probably unnecessary. Most of the options are flat with the exception of flags. I most try to work around it. shallow is probably fine

If the command runner loaded classes rather than instances, many problems would be mitigated.
This would probably be easier with class properties

Originally posted by @esatterwhite in #32

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDiscussion Related Issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions