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

the example dist.js for bun projects doesn't resolve paths relative to the package.json dir #1330

Open
Gankra opened this issue Aug 16, 2024 · 0 comments
Labels
bug Something isn't working javascript Pull requests that update Javascript code

Comments

@Gankra
Copy link
Contributor

Gankra commented Aug 16, 2024

While we defaulted to slapping the dist.js next to the package.json, many will want to shove it in a subdir. Although they will have to do a hand-edit for getting the package.json path, after that we should design the script to use the dir that's in as the root all other paths should be relative to.

This includes binScript and binPath.

I think just factoring out like "relative path to package root dir" as a constant at the top of the file would be the simplest way to do this.

https://github.com/axodotdev/axolotlsay-bun/blob/d646592821e9e466f9c2e931539c2c6f8376075b/dist.js#L27-L28

@Gankra Gankra added bug Something isn't working javascript Pull requests that update Javascript code labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

1 participant