Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback


📦 Zero-config web application packager in Deno
Go to Latest
import { ensureDir, join, NAME, VERSION } from "./deps.ts";import { wasmCacheDir, wasmPath } from "./install_util.ts";
await ensureDir(wasmCacheDir());
const wasmUrl = `${NAME}@${VERSION}/esbuild.wasm`;
console.log(`Downloading esbuild wasm from ${wasmUrl}`);
const res = await fetch(wasmUrl);const bytes = new Uint8Array(await res.arrayBuffer());const size = (bytes.byteLength / 1024 / 1024).toFixed(2);await Deno.writeFile(wasmPath(), bytes);console.log(`Saved esbuild wasm (${size}MB) at the path ${wasmPath()}`);
console.log(`Installing ${NAME} command`);const p ={ cmd: [ Deno.execPath(), "install", "--unstable", "-qAf", `${NAME}@${VERSION}/cli.ts`, ],});
Deno.exit((await p.status()).code);