Web Toolchain

Run JavaScript and TypeScript and process web assets

Elide runs JavaScript and TypeScript, serves local files, installs npm dependencies, and processes common web assets.

Run JavaScript and TypeScript

elide run app.js
elide run app.ts

TypeScript type annotations are removed automatically. JavaScript and TypeScript module extensions such as .mjs, .cjs, .mts, and .cts are also recognized.

Serve and develop

Serve a directory on 127.0.0.1:8080:

elide serve dist

Start the development server on 127.0.0.1:3000 with file watching and live reload:

elide dev src

Use --host and --port to change the bind address. See Development Server for the distinction between these commands.

Process assets

elide web build processes individual files without requiring an elide.pkl manifest:

elide web build app.ts --out dist
elide web build page.md --out dist
elide web build style.css --out dist

In 1.5.0 these commands produce JavaScript, HTML, and CSS respectively. Multiple sources and shell-expanded patterns are accepted.

Image optimization is not available and is intentionally omitted from this guide.

Install npm packages

elide install --ecosystems=npm

See NPM Installer for project layout and selection rules.

Project builds

An Elide project can declare a static-site artifact and build it with elide build. See Static Sites and the elide.pkl Reference.