refactor(cli): some general refactoring in swc_cli #5003
+261
−212
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Hi all. First time contributor here.
I saw @kwonoj 's comment in this issue and became interested in the port of
swc_cli
to rust. I had a couple of free hours today and so just went through trying to familiarize myself with the existing code a bit and perform a few changes.I mostly focused on the
compile
command.I noticed a couple of small improvement opportunities if you guys like them:
PathBuf
s)&Option<PathBuf>
in function signatures to what I think is the slightly more idiomaticOption<&Path>
.At some point, I'd like to try my hand at adding some new code fill in more of the missing pieces of the cli, but, today, I just started with some general tweaks to what's already there.
Looking forward to seeing if you're interested in any of these changes.
Best,
Brian
Related issue (if exists):
#1589