-
Notifications
You must be signed in to change notification settings - Fork 134
Add npx-like behavior #157
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
Comments
I was also thinking the same, that a bin property similar to package.json would be great to have 💪🏻 |
Hi everybody, looks the pr related to this ticket is in stale, any update on the topic? Thanks a lot |
I think this is a dupe of jsr-io/jsr-npm#76 I created an xjsr package as a workaround you can run like this: ➜ npx xjsr @alexgleason/hello
hello I needed this for my own projects. Feel free to use it. But I'm guessing this issue hasn't been resolved in JSR itself because of incompatibilities between Deno and Node. For example, this package does not work correctly: (The So far I am only using xjsr for packages that are already Node-compatible. But it might be possible to stick Babel in there to transpile the package and solve some of this. |
I'm submitting this feature request encouraged by @marvinhagemeister on the Discord server.
Context
I was wondering if we could run packages "on the fly" similar to how
npx
,yarn dlx
,pnpm dlx
andbunx
does.Behavior
Basically, the expected behavior would be the same or similar as explained in the docs of the previously mentioned commands (npx for reference).
In other words, running the command will first search for the package locally. If it's found, it will run it directly. Otherwise, the command will temporarily fetch the package, run it, and then delete it after use.
Examples
I guess this will be discussed either here, in the pr or by the team but here are a few examples from the top of my head.
bunx jsrx @<namespace>/<package>
npx jsr:@<namespace>/<package>
NOTE: I hope the idea is well conveyed and there wasn't a misunderstanding with the feature, feel free to comment what you think about it or ping me if want to add something to the post.
The text was updated successfully, but these errors were encountered: