Skip to main content

@deno/emit@0.40.3

Works with
JSR Score
82%
Published
a week ago

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 "https://deno.land/x/emit/mod.ts";

const url = new URL("./testdata/mod.ts", import.meta.url);
const result = await transpile(url.href);

const { code } = result;
console.log(code.includes("export default function hello()"));

Example - Bundling

import { bundle } from "https://deno.land/x/emit/mod.ts";
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 @deno/emit

Import symbol

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

Add Package

npx jsr add @deno/emit

Import symbol

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

Add Package

yarn dlx jsr add @deno/emit

Import symbol

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

Add Package

pnpm dlx jsr add @deno/emit

Import symbol

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

Add Package

bunx jsr add @deno/emit

Import symbol

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