jsr icon indicating copy to clipboard operation
jsr copied to clipboard

Make packages installable (binary)

Open m-dressler opened this issue 1 year ago • 3 comments

Not sure if this is better to bring up here or in deno's repo, but I'd like to be able to host an installable (not 'addable') package on jsr.io, i.e., deno install @example/my-runnable-package.

Maybe this is already possible but not documented which URL I would need to install from, and it's as easy as marking a package as installable which updates the JSR installation instructions:

{
  "version": "1.0.0",
  "installable": true,
  "exports": "./main.ts",
  "imports": {
    "@example/package": "jsr:@example/package@^1.0.0"
  }
}

m-dressler avatar Mar 17 '24 21:03 m-dressler

In Deno you can install a JSR package with deno install jsr:@example/package.

lucacasonato avatar Apr 08 '24 10:04 lucacasonato

@lucacasonato Thank you! Probably just starting to work with Deno here. I personally would feel it would be nice to have jsr: be the default inferred package manager for deno install, but if that's not on the table this issue can be closed :)

m-dressler avatar Apr 09 '24 07:04 m-dressler

In Deno you can install a JSR package with deno install jsr:@example/package.

This is great, but for me part of the appeal of JSR is that it just works with all of the runtimes. Is it possible to publish an installable/binary in a way that it can be npm installed, then run with npx <name> or <name> (if -g is used)?

bcheidemann avatar Jul 31 '24 15:07 bcheidemann