webpack / webpack-cli

Webpack's Command Line Interface
https://webpack.js.org/api/cli
MIT License
2.56k stars 597 forks source link

feat: added config command #4126

Open samrudh3125 opened 5 months ago

samrudh3125 commented 5 months ago

What kind of change does this PR introduce?

It introduces a new feature which is the config command which has three options i.e file, name and include.

Did you add tests for your changes?

I have added tests for name and file option but for include didn't add tests as at this stage it just prints the present configuration in the console.

Summary

The issue #3537 is solved in this PR. This was a very good issue to work on as i could understand the complete codebase of webpack as I am aiming at working in one of the projects of webpack in GSOC.

Does this PR introduce a breaking change?

Yes there are a lot of changes as I have completely deleted the built in commands --config and --config-name and introduced a whole new command in their place. Other information

linux-foundation-easycla[bot] commented 5 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

samrudh3125 commented 5 months ago

Yes but in the issue itself you had asked to create a webpack config command which has 3 options: 1 file- which replaces --config 2 name- which replaces --config-name 3 include- which is the additional options which prints the whole configuration in the console.

webpack-bot commented 5 months ago

Hi @samrudh3125.

Just a little hint from a friendly bot about the best practice when submitting pull requests:

Don't submit pull request from your own master branch. It's recommended to create a feature branch for the PR.

You don't have to change it for this PR, just make sure to follow this hint the next time you submit a PR.

snitin315 commented 5 months ago

Yes but in the issue itself you had asked to create a webpack config command which has 3 options: 1 file- which replaces --config 2 name- which replaces --config-name 3 include- which is the additional options which prints the whole configuration in the console.

No this is not the intent of the issue. Those are options for this command to print selective configurations and can be added later.

samrudh3125 commented 5 months ago

Then can you please elaborate the issue once again so that I change it accordingly

samrudh3125 commented 5 months ago

My bad actually since I removed the command I deleted the tests

webpack-bot commented 5 months ago

@samrudh3125 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@alexander-akait Please review the new changes.