-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate CLI? #436
Comments
馃憤 |
Can you provide an example of such a package? How to provide CLI in such a way? |
Essentially it means removing the binary and associated dependencies/code from this module, out to a new module, say svgo-cli. Then svgo-cli would depend on svgo, and be its own package with its own tests etc. |
@GreLI Any thoughts? |
That's a major change, and I'm not sure, that it really worth it. |
@GreLI You can firstly just make svgo-cli which will be dependent on svgo. Dependencies will be deduped. |
Why do you think that dependendecies are such a big problem? Perhaps, svgo will reutilize them in the future 馃槣. |
After reading @sindresorhus' reasoning on this (sindresorhus/ama#17 (comment)) I thought it was a good practice to have a separate CLI. It makes sense for those wrapper modules that will not make use of the command line, and therefore don't need the dependencies. This way the package is leaner overall. 馃槃 The why is simple; extra calls to npm & more to download means slower build times. Less is more. |
馃憤 In addition, it makes the readmes neater, as you don't have to fit both CLI and API docs into one readme. |
Is it a big issue? I don't think so. |
@GreLI For you it's not a big issue. For us yes. Web should be small in every ways. |
Would you accept a PR for this? |
I afraid this goes beyond a simple PR. |
Sorry, a PR and an |
I'm hardly imagine such a request, but you can try make so. |
SVGO has a lot of dependents - it would be nice to extract the CLI into a separate module so that consumers of the JS API don't have to download coa, mkdirp et al. 馃槃
The text was updated successfully, but these errors were encountered: