-
Notifications
You must be signed in to change notification settings - Fork 507
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
RFC: Better DX for making CLI #793
Comments
I'm not sure what the exact issue is in #109 , but that was implemented there just stripped them out in #117. The most up-to-date shebang plugin I've seen is elado/rollup-plugin-preserve-shebangs, which also has tests. But just replacing the shebang plugin still runs into #338. I had actually been doing some work to fix #338 by converting the
A few things to unpack here. But yea it's not a primary use-case or quite as useful in a CLI, or generically in server-side code.
Did you have something in mind other than that? I didn't really understand the comparison you were trying to draw
Assuming those issues get fixed, to enable this it'd just be a lot of inputs |
Should be careful here. Many CLI projects would also ship a programmatic interface, that is the "classic" tsdx package + CLI, not just CLI. For example, I want to ship
If there would be a simple way to setup and build module+CLI packages, I am sure many lazy developers |
@ivan-aksamentov Sounds like you're requesting multi-entry, i.e. #367 |
@agilgur5 Yes, multiple entries would be fantastic. For my case I'd like one entry to be an executable and another to be a library. That is, the CLI-ness and
should be configurable on per-entry basis (and this is probably true for other config options as well). This basically becomes similar to having two separate tsdx builds with two different configs, but in the same directory and with one config file. As an alternative to multi-entry, and a quick and dirty solution maybe tsdx config can export an array of config objects, similarly to how webpack config can (this sometimes used for SSR setups). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Closing this out as stale/duplicate since OP has not responded since opening and it is mostly duplicative of existing issues |
Please re-open. This is still very much an issue. |
You're welcome to respond to previous comments. Otherwise, this issue is adding noise as a duplicate (and the comments are illustrative of that). |
Current Behavior
TSDX doesn't really support building CLI's well.
#!/usr/bin/env node
in front of./dist/index.js
. I recently did this in a lil postbuild script. Not bad, but also not great.Desired Behavior
Building CLI's should be seamless and intuitive
Suggested Solution
Who does this impact? Who is this for?
Describe alternatives you've considered
Additional context
The text was updated successfully, but these errors were encountered: