netlify / cli

Netlify Command Line Interface
http://cli.netlify.com
MIT License
1.58k stars 358 forks source link

Consider splitting up CLI functionality and/or cutting down on dependencies #6322

Open rschristian opened 10 months ago

rschristian commented 10 months ago

Which problem is this feature request solving?

We are using netlify-lambda for Preact's docs and only today did I realize that it has long since been deprecated in favor for netlify-cli. However, upon installing netlify-cli and fixing up the commands, I saw this adds ~1300-odd packages and about 300MB to node_modules (40% of that project's total with this installed, for reference).

This is unfortunately a complete non-starter for that project, way to much of a size increase for such minimal functionality we need. This has a huge negative impact on contributors' and CI time, so we're stuck with netlify-lambda or migrating to our own tooling for serving & building the functions we need.

Describe the solution you'd like

Would love to see some time and attention paid to dependency use and/or cutting the CLI up by feature. I don't imagine many users are fully utilizing the full suite of functionality that this offers all at once, splitting up the CLI (or distributing parts of the CLI separately in addition to what already exists) could be a compelling option.

Pull request (optional)

mistic100 commented 3 weeks ago

I wanted to use netlify-cli to deploy my doc pages, but then my yarn.lock almost tripled in size. So nope, I gonna implement the deploy API myself.

Which is a shame because splitting this package would even propably ease the maintainance for Netlify teams.

rschristian commented 3 weeks ago

I ended up doing something similar for us: we reduced Netlify usage in general & reimplemented the functionality we still needed via other methods. We simply could not justify adding this massive, massive CLI for the limited functionality that we needed.