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

hashbang binary configuration #644

Open
souporserious opened this issue Jan 28, 2025 · 1 comment
Open

hashbang binary configuration #644

souporserious opened this issue Jan 28, 2025 · 1 comment

Comments

@souporserious
Copy link

First, thank you for this project! It's such a simple, but powerful build tool ❤

I was curious if you've thought about using the presence of the hashbang (e.g. #!/usr/bin/env node) in a file to automatically infer binary configuration? It would be nice to not need a directory as part of the binary configuration and could lean into being a little less config or having to look up docs for it.

@huozhi
Copy link
Owner

huozhi commented Jan 28, 2025

Hi thanks for the feedback! The preseving of shebang #!/usr/bin/env node already works with bunchee. But for exposed commands in ./node_modules/<your lib>/<binary cmd>, you still needs to define it in "bin" field to configure it hence I add the convention bin folder to match the configuration in package.json.

I like the idea that we probably don't need the folder as it's almost same, will think about improvng that in the future release 🙌

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

No branches or pull requests

2 participants