Closed greggman closed 2 years ago
I love the idea. Personally I would prefer to make showdown
the core library and add a new package called showdown-cli
. To me it seems the cli is less used then the library itself.
Let me know what idea you might have, and if you are adventurous enough to create a PR, I can even create a repo for it.
The issue is that the CLI is dependant on some functionalities and implementation details of the main library, it might become a challenge to maintain them in sync. Also, version mismatch might occur.
However, the CLI does not really need yargs.
I think a more favourable approach would be to refactor the CLI, to remove yargs dependency, and keep the libraries together. All yargs is doing is making it easier to create the CLI code boilerplate. Shouldn't be too hard to refactor, since the CLI doesn't implement many commands anyway.
This is fixed in the latest release
I hope this will be received in a positive spirit.
This was requested before: https://github.com/showdownjs/showdown/issues/348
Isn't in clear now why they should be separated?
Yargs is not needed by anyone using this package as a library but it adds 16 dependencies (it and 15 more).
Every one of those is yet
npm outdated
messagescolors
package fiascoAnd multiply all of that by every user of this package as a library (that's 1000s and 1000s of users).
Doesn't seem like it would be better to remove those 15 packages that are not needed by people using this as a library?
As another possibility, you could make
showdown-lib
(the lib only version) and then either keepshowdown
as is or makeshowdown
the cli part plus the dependencies onshowdown-lib
.Note: I get that I can fork this project and do it myself. I thought I'd ask though before I go do that.