Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/src/server/deps.ts

The next-gen web framework.
Extremely Popular
Go to Latest
import * as fresh from "https://deno.land/x/fresh@1.2.0/src/server/deps.ts";

Namespaces

parse function for parsing JSONC (JSON with Comments) strings.

Enums

Standard HTTP status codes.

Functions

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.

A synchronous version of "analyzeMetafile".

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.

A synchronous version of "build".

This is the advanced long-running form of "build" that supports additional features such as watch mode and a local development server.

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.

A synchronous version of "formatMessages".

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.

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.

A synchronous version of "transform".

Escapes arbitrary text for interpolation into a regexp, such that it will match exactly that text and nothing else.

Converts a JSON with Comments (JSONC) string into an object. If a syntax error is found, throw a SyntaxError.

Serves HTTP requests with the given handler.

Converts a hash to a string with a given encoding.

Returns the media type associated with the file extension. Values are normalized to lower case and matched irrespective of a leading ..

Walks the file tree rooted at root, yielding each file or directory in the tree filtered according to the given options.

Interfaces

Information about the connection a request arrived on.

Additional serve options.

Type Aliases

The type of the result of parsing JSON.

A handler for HTTP requests. Consumes a request and connection information and returns a response.

A handler for HTTP requests. Consumes a request and connection information and returns a response.