Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simplification of command classes #33

Open
esatterwhite opened this issue Feb 14, 2021 · 0 comments
Open

simplification of command classes #33

esatterwhite opened this issue Feb 14, 2021 · 0 comments
Labels
discussion Discussion Related Issues

Comments

@esatterwhite
Copy link
Owner

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

@esatterwhite esatterwhite added the discussion Discussion Related Issues label Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion Related Issues
Projects
None yet
Development

No branches or pull requests

1 participant