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

Feature: Init transformations #29

Closed
pksjce opened this issue Jan 2, 2017 · 2 comments
Closed

Feature: Init transformations #29

pksjce opened this issue Jan 2, 2017 · 2 comments

Comments

@pksjce
Copy link

pksjce commented Jan 2, 2017

Do you want to request a feature or report a bug?
Feature - webpack --init should kickstart a volley of inquirer questions. Each of the questions will be backed by a transformer. Each transformer will be transforming a single AST. When the end of questions is reached, the AST will be pretty printed to source code of the webpack config.

What is the current behavior?
Does not exist

If the current behavior is a bug, please provide the steps to reproduce.
Does not exist

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?
Initial development

Please mention other relevant information such as the browser version, Node.js version, Operating System and programming language.

WIP - project structure for the same.

@pksjce pksjce self-assigned this Jan 2, 2017
@DanielaValero DanielaValero changed the title Init transformations Feature: Init transformations Jan 3, 2017
@DanielaValero
Copy link
Contributor

DanielaValero commented Jan 3, 2017

We should also add here an explicit task to run a validation of the generated config, so we ensure that everything is going to work fine for the user.

Also, would be nice when we could optionally generate webpack 1 and/or webpack 2 configs

Here are also some notes of features the init should have. Taken from #4

  • Add entry point and output path.
  • Add prewritten configs to add babel support, css/scss/less support, hmr and so on.
  • Allow to add DEV and PROD configurations.
  • This should build an annotated webpack configuration file.
  • If a config file is already existing in the given path, the init command should prompt the user if they want to overwrite the current config, or to specify a new filename for the config file.

Also some people have suggested to allow the user to generate a specific config for different architectures, such as vue, or react. When we do so, we should then consider for which frameworks we want to generate a setup, and how they differ from each other. IMHO there are way to many frameworks, and we can't support a generation for them all, at least at the beginning, so, the first question to answer would be:

  • Does it make sense to generate a setup per framework? If so, which ones will we support?
  • How complex do we want to generate the config files? There are multiple ways to write a config file for webpack, we should decide for a configuration file(s) that is simple enough for a developer to understand, that allows to be manually extended, and that also proposes a pattern for a good practice on the setup.

Similar initiatives: webpack-init

@evenstensberg
Copy link
Member

I think this is resolved of #105 , reopen if needed.

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

3 participants