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 request: add a recursive flag to the CLI options #5645

Closed
Pomax opened this issue Sep 4, 2022 · 5 comments · Fixed by #5646
Closed

feature request: add a recursive flag to the CLI options #5645

Pomax opened this issue Sep 4, 2022 · 5 comments · Fixed by #5646

Comments

@Pomax
Copy link

Pomax commented Sep 4, 2022

There is currently no option to just run Uglify on a dir and have it replace everything in CLI context. It would be super useful to have a --recursive option so you can just go npx uglify --recursive . and have it do what it needs to do.

@alexlamsl
Copy link
Collaborator

Firstly, when you specify multiple input files, uglify-js will concatenate them into a single output file by default.

We do have --in-situ flag on CLI to process and overwrite a list of input files.

We also support glob-style input, e.g. path/to/*.js, for specifying input files.

However they don't current work together, so that we can improve upon.

alexlamsl added a commit to alexlamsl/UglifyJS that referenced this issue Sep 5, 2022
alexlamsl added a commit that referenced this issue Sep 5, 2022
@Pomax
Copy link
Author

Pomax commented Sep 5, 2022

awesome, thank you so much for the quick PR!

@Pomax
Copy link
Author

Pomax commented Sep 5, 2022

Oh: this might still need a small update to the readme and --help texts before "really" considering it closed, since this adds new functionality that should probably be discoverable in the docs as well.

@alexlamsl
Copy link
Collaborator

Probably worth a section in README.md mentioning the glob usage etc. − feel free to contribute.

@Pomax
Copy link
Author

Pomax commented Sep 5, 2022

given the number of projects I'm currently swamped with, and not having written the PR or original docs: you're far more qualified than I am to add that.

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

Successfully merging a pull request may close this issue.

2 participants