rjsr
v1.0.2
Published
Run a JSR package as a script
Downloads
202
Readme
rjsr
Run JSR packages as a script.
rjsr is an active fork of xjsr.
Why?
Even though JSR packages are compatible with Node, there is no way to execute
their default export with npx. For more information, see:
https://github.com/jsr-io/jsr-npm/issues/76
Usage
Usage: npx rjsr [--no-cache] @namespace/package[@version][/export] [-- package-args]
Options:
--no-cache Skip the local cache and download the package
-- package-args Arguments to pass to the package
Examples:
npx rjsr @alexgleason/hello
npx rjsr --no-cache @alexgleason/hello
npx rjsr @alexgleason/[email protected]
npx rjsr @alexgleason/hello/world
npx rjsr @alexgleason/hello -- --some-flag valueIt also correctly uses bun when run with bunx
How It Works
rjsr:
- Installs the JSR package into a cache dir with npm or bun.
- Runs the export with node or bun depending on the detected JavaScript runtime.
License
This is free and unencumbered software released into the public domain.
