Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

§Variables

version

§Functions

analyzeMetafile

Pretty-prints an analysis of the metafile JSON to a string. This is just for convenience to be able to match esbuild's pretty-printing exactly. If you want to customize it, you can just inspect the data in the metafile yourself.

analyzeMetafileSync

A synchronous version of "analyzeMetafile".

build

This function invokes the "esbuild" command-line tool for you. It returns a promise that either resolves with a "BuildResult" object or rejects with a "BuildFailure" object.

buildSync

A synchronous version of "build".

formatMessages

Converts log messages to formatted message strings suitable for printing in the terminal. This allows you to reuse the built-in behavior of esbuild's log message formatter. This is a batch-oriented API for efficiency.

formatMessagesSync

A synchronous version of "formatMessages".

initialize

This configures the browser-based version of esbuild. It is necessary to call this first and wait for the returned promise to be resolved before making other API calls when using esbuild in the browser.

serve

This function is similar to "build" but it serves the resulting files over HTTP on a localhost address with the specified port.

transform

This function transforms a single JavaScript file. It can be used to minify JavaScript, convert TypeScript/JSX to JavaScript, or convert newer JavaScript to older JavaScript. It returns a promise that is either resolved with a "TransformResult" object or rejected with a "TransformFailure" object.

transformSync

A synchronous version of "transform".

§Interfaces

AnalyzeMetafileOptions
BuildFailure
BuildIncremental
BuildInvalidate
BuildOptions
BuildResult
FormatMessagesOptions
InitializeOptions
Location
Message
Metafile
Note
OnLoadArgs
OnLoadOptions
OnLoadResult
OnResolveArgs
OnResolveOptions
OnResolveResult
OnStartResult
OutputFile
PartialMessage
PartialNote
Plugin
PluginBuild
ResolveOptions
ResolveResult
ServeOnRequestArgs
ServeOptions

Documentation: https://esbuild.github.io/api/#serve-arguments

ServeResult

Documentation: https://esbuild.github.io/api/#serve-return-values

StdinOptions
TransformFailure
TransformOptions
TransformResult
WatchMode

§Type Aliases

Charset
Drop
Format
ImportKind
Loader
LogLevel
Platform