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: --package-json CLI argument #25

Closed
wants to merge 1 commit into from

Conversation

jfirebaugh
Copy link
Contributor

Support explicitly specified package.json in CLI.

I have a use case where I have the directory structure:

  • root
    • package
      • tsconfig.json
      • package.json

And I want to run t2s from root, with arguments t2s --filename package/tsconfig.json --package-json package/package.json. I would rather be explicit about file paths than use --cwd.

Support explicitly specified package.json in CLI.
@songkeys
Copy link
Owner

Thank you for this PR!

This adds a lot of complexity to the function arguments. I don't think this argument is necessary. You can use the cwd argument or read the package.json yourself and override the options using the swcOptions argument.

I'll keep this PR open to see if others find this useful as well. Perhaps in the next major version, I can simplify the function arguments to bring this in.

@jfirebaugh
Copy link
Contributor Author

Fair enough, I will fork/vendor the code then.

@jfirebaugh jfirebaugh closed this Oct 23, 2024
@jfirebaugh jfirebaugh deleted the jfirebaugh/package-json branch October 23, 2024 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants