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

Monorepo and Dependency Strategy for the CLI #261

Closed
evenstensberg opened this issue Feb 9, 2018 · 8 comments
Closed

Monorepo and Dependency Strategy for the CLI #261

evenstensberg opened this issue Feb 9, 2018 · 8 comments

Comments

@evenstensberg
Copy link
Member

The new webpack-cli might be good for some folks but bad for others. When I ( as an FE dev) want to run webpack to compile my architecture I don't want to get more installation time because there's new features like the migration and initialization.

In the next couple of steps of the CLI's lifecycle we're gonna do the following ( like we've already done with webpack )

  • Features like init and migrate are going to be published at webpack-addons and then we are going to ask the user to install the dependencies for a given feature if he/she hasn't installed it yet- This way, users can benefit from both having decreased bundle size as well as having the option to add utilities like migrate and init.

Ultimately, what I'd like to see, is a monorepo like the lighthouse team has for chrome-logger, chrome-launcher and similar. This way we can keep the packages in one repo to preserve a compact and clear structure of the CLI.

@evenstensberg evenstensberg changed the title Monrepo and Dependency Strategy for the CLI Monorepo and Dependency Strategy for the CLI Feb 9, 2018
@evenstensberg evenstensberg added this to the Vatican (v3) milestone Feb 9, 2018
@montogeek
Copy link
Member

What is the current structure of the repo, is there any parts that could be extracted into smaller packages?

@evenstensberg
Copy link
Member Author

All the separate features like serve, init, migrate and so on. No separate packages yet, with the exception of the add-ons suite

@EugeneHlushko
Copy link
Member

Is there a way to contribute? Who is going to create webpack-addons-xxx repos under webpack organization?

@evenstensberg
Copy link
Member Author

Gonna take this up with the team later, soon finished with my assignments so that I can actually do something soon. Would be good to discard webpack add-ons and host the packages as a minorepo in webpack-cli

@billyjanitsch
Copy link
Member

For one-off chores like init and migration, why not make each tool a separate pkg/CLI, and encourage users to run them using npx? e.g. npx webpack-init or npx webpack-migrate. Then users don't incur the cost of including them as dev dependencies.

I don't really see the purpose of a monolithic CLI that doesn't actually includes its features, especially when a great alternative exists via npx. It seems like a maintenance burden without any real advantage.

@evenstensberg
Copy link
Member Author

Yes, that's the plan

@evenstensberg
Copy link
Member Author

And while it is a burden, it allows us to be flexible around composition and we also allow people to use the AST transforms directly

@evenstensberg
Copy link
Member Author

This is resolved and included in a newer version of the webpack-cli.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants