-
Notifications
You must be signed in to change notification settings - Fork 12
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
Refactor CLI to a different module? #74
Comments
Hmmm, interesting! I hadn't really thought about that. I found this online tool which visualises the size: https://arve0.github.io/npm-download-size/#alias-hq From that it looks like jscodeshift is maybe 60% of the 5MB install. I guess I would have to weigh up the pros and cons of whether it actually matters, vs maintaining two separate repositories, docs, issues, awareness, etc. FWIW the CLI is also used to let folks configure paths and plugins which is nice as adding TS aliases by hand is a bit cumbersome. Can you make any cases for why saving ~3MB really matters? |
Having reviewed my own docs again (it's been a while!) the CLI also helps folks debug their setups, as well as develop and publish plugins, so I think I'll close this issue for now; it's just simpler to keep everything together. Hopefully a bit of the context there has been helpful though! |
Doesn't necessarily have to be two repositories, monorepos exist (but are not without complications, admittedly). Also, you only mentioned jscodeshift when I'm guessing these are only to do with the CLI:
Which account for ~87% of the size. And the original 5MB isn't accurate:
Edit: Just found about about this tool which seems more accurate: https://pkg-size.dev/alias-hq |
That's a nice tool! Though I'm not sure I totally understand the output for our use case; we want to know the total installed size of X vs Y dependencies, right? So I did a quick test (Basic CLI = plugin management, Full CLI = code refactoring):
So I think this proves your point very well... I'm just not convinced that it warrants a refactor, publishing to separate NPM packages, etc. Although thinking about it, a workable option might be for developers who wish to create plugins or refactor code to install from GitHub using an alias:
I've just attempted this, and it works, as in, the user can run the cli:
I tell you what, let me experiment with a stripped down version published to a personal namespace, then if it works, I think it could be a nice introduction. I'm not going to get time to do this probably until Christmas though, but if you don't mind waiting (or installing!) until then, I will defo take a look. |
Love the idea of the module, but for people who don't want to use the CLI ... quite a lot of modules are installed:
Yeah it's 48 thousand lines, I can't paste it in GitHub, Gist, or Pastebin, but the bulk of them come from jscodeshift, which isn't needed for people not looking to use the CLI.
The text was updated successfully, but these errors were encountered: