axodotdev / axodotdev/cargo-dist
the example dist.js for bun projects doesn't resolve paths relative to the package.json dir
- Dominant language
- Rust
- Stars
- 2.1k
- Forks
- 149
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 32
Description
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
Contributor guide
Research direction
Start with the example dist.js referenced at axolotlsay-bun/blob/d646592821e9e466f9c2e931539c2c6f8376075b/dist.js#L27-L28 and inspect how package.json, binScript, and binPath are resolved. Verify that moving dist.js into a subdirectory keeps those paths relative to the package root; the issue provides no test or repository file to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bun, javascript
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100