swc-project / pkgs

node.js packages for SWC
62 stars 20 forks source link

feat(cli): Added cli-config-file option. #20

Closed ShogunPanda closed 9 months ago

ShogunPanda commented 9 months ago

This PR add a new option that can point to JSON file. This file can contain any option supported by CLI (either in kebab-case or camelCase format) and will applied accordingly. Other options explicitly provided via command line override the one in the JSON file (so that the file can act as a "template").

Fixes https://github.com/swc-project/cli/issues/284

changeset-bot[bot] commented 9 months ago

🦋 Changeset detected

Latest commit: 25bf228c8e867730d1025200f80e7356f929315c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------- | ----- | | @swc/cli | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

socket-security[bot] commented 9 months ago

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/commander@8.3.0 environment, filesystem, shell 0 151 kB abetomo

🚮 Removed packages: npm/commander@7.1.0

View full report↗︎

ShogunPanda commented 9 months ago

That is totally legit, no problem. Do you mind to elaborate a little bit so we can find eventually a way to both be happy about it?

kdy1 commented 9 months ago

Ah, sorry. I thought you added fields to .swcrc, but it was a separate file. I'll review/merge after finishing some tasks in my hand.

ShogunPanda commented 9 months ago

No worries, no issues at all. Keep me posted!

kdy1 commented 9 months ago

Can you fix CI?

ShogunPanda commented 9 months ago

I tried on my Win machine and did not fail. Do you mind retrying here just in case?

ShogunPanda commented 9 months ago

@kdy1 Any update on this?

kdy1 commented 9 months ago

I retried CI several times but it still fails

ShogunPanda commented 9 months ago

Sorry, my bad. I ran it on the wrong branch. I was able to reproduce, fixing it.

ShogunPanda commented 9 months ago

Solved. :)