网页
综合
更新时间 2026-11-14 05:13:27
Introduction to JSR - Docs - JSR
自动蜘蛛
jsr.io
正文约 1460 字
View table of contents
The JavaScript Registry (JSR) is a modern package registry for JavaScript and TypeScript. JSR works with many runtimes (Node.js, Deno, Bun, browsers, and more) and is backwards compatible with npm. Learn more about why we built JSR.
Add a package to your project using one of the commands below. This will add the most recent version of @luca/cases to your project.
After adding the package, you can import and use it in ES modules like so:
In Deno, you can optionally use JSR packages without an install step using jsr: specifiers and Deno’s native support for JSR.
You can find more packages on jsr.io. Each package on the JSR site also displays documentation, which is automatically generated from the package’s source code. Learn more about using packages.
JSR packages are published using the jsr publish / deno publish command. You can publish packages from your local machine, or from CI.
First, write your code. JSR packages are written in JavaScript or TypeScript, and are published as ES modules.
Then, add a config file to your package. This file contains package metadata like the name, version, and entrypoint(s). The exports field tells JSR which modules should be importable by users of your package.
Finally, run npx jsr publish, or deno publish to publish your package. You will be prompted to authenticate with JSR, and then your package will be published.
Learn more about publishing packages.
Edit this page on GitHub
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。