-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace deno.land/x with jsr in examples and badges
- Loading branch information
1 parent
bfe9b32
commit 604aff2
Showing
3 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/[email protected]/examples/chat/server.ts"), | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]/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/[email protected]/examples/chat/server.ts", | ||
* ); | ||
|