Skip to main content

@deno/emit@0.46.0
Built and signed on GitHub Actions

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
82%
Published
5 months ago (0.46.0)

APIs to transpile and bundle JavaScript and TypeScript under Deno and Deno.

It is a user loadable module which provides an alternative to the removed unstable Deno.emit() API.

Example - Transpiling

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()"));

Example - Bundling

import { bundle } from "jsr:@deno/emit";
const result = await bundle(
  "https://deno.land/std@0.140.0/examples/chat/server.ts",
);

const { code } = result;
console.log(code);
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@deno/emit

Import symbol

import * as emit from "@deno/emit";

---- OR ----

Import directly with a jsr specifier

import * as emit from "jsr:@deno/emit";

Add Package

npx jsr add @deno/emit

Import symbol

import * as emit from "@deno/emit";

Add Package

yarn dlx jsr add @deno/emit

Import symbol

import * as emit from "@deno/emit";

Add Package

pnpm dlx jsr add @deno/emit

Import symbol

import * as emit from "@deno/emit";

Add Package

bunx jsr add @deno/emit

Import symbol

import * as emit from "@deno/emit";