diff --git a/README.md b/README.md index 5887ff4..c14eaf7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # deno_emit -[![deno emit](https://doc.deno.land/badge.svg)](https://doc.deno.land/https://deno.land/x/emit/mod.ts) +[![deno emit](https://jsr.io/badges/@deno/emit)](https://jsr.io/@deno/emit) [![Twitter handle][]][Twitter badge] [![Discord Chat](https://img.shields.io/discord/684898665143206084?logo=discord&style=social)](https://discord.gg/deno) diff --git a/js/README.md b/js/README.md index 513973c..bbeb3ed 100644 --- a/js/README.md +++ b/js/README.md @@ -1,6 +1,6 @@ # emit -[![deno emit](https://doc.deno.land/badge.svg)](https://doc.deno.land/https://deno.land/x/emit/mod.ts) +[![deno emit](https://jsr.io/badges/@deno/emit)](https://jsr.io/@deno/emit) Transpile and bundle JavaScript and TypeScript in Deno and Deno Deploy. @@ -13,13 +13,13 @@ transpiled fashion. An example of taking some TypeScript and transpiling to JavaScript: ```ts -import { transpile } from "https://deno.land/x/emit/mod.ts"; +import { transpile } from "jsr:@deno/emit"; const url = new URL("./testdata/mod.ts", import.meta.url); const result = await transpile(url); const code = result.get(url.href); -console.log(code.includes("export default function hello()")); +console.log(code?.includes("export default function hello()")); ``` ## Bundle @@ -29,7 +29,7 @@ This is similar to the functionality provided by `deno bundle` on the Deno command line. An example: ```ts -import { bundle } from "https://deno.land/x/emit/mod.ts"; +import { bundle } from "jsr:@deno/emit"; const result = await bundle( new URL("https://deno.land/std@0.140.0/examples/chat/server.ts"), ); diff --git a/js/mod.ts b/js/mod.ts index 177ea57..0cad394 100644 --- a/js/mod.ts +++ b/js/mod.ts @@ -8,19 +8,19 @@ * ### Example - Transpiling * * ```ts - * import { transpile } from "https://deno.land/x/emit/mod.ts"; + * import { transpile } from "jsr:@deno/emit"; * * const url = new URL("./testdata/mod.ts", import.meta.url); - * const result = await transpile(url.href); + * const result = await transpile(url); * - * const { code } = result; - * console.log(code.includes("export default function hello()")); + * const code = result.get(url.href); + * console.log(code?.includes("export default function hello()")); * ``` * * ### Example - Bundling * * ```ts - * import { bundle } from "https://deno.land/x/emit/mod.ts"; + * import { bundle } from "jsr:@deno/emit"; * const result = await bundle( * "https://deno.land/std@0.140.0/examples/chat/server.ts", * ); @@ -156,7 +156,7 @@ export interface CompilerOptions { * ### Example * * ```ts - * import { bundle } from "https://deno.land/x/emit/mod.ts"; + * import { bundle } from "jsr:@deno/emit"; * const result = await bundle( * "https://deno.land/std@0.140.0/examples/chat/server.ts", * );