Esc

Installation

Streak.js projects use the streak-forge CLI for development and builds. The project is configured via streak.sitemap.json and standard package.json scripts.


CLI Commands

There are two primary CLI commands:

streak-forge dev

Starts the development server with hot-reload. Pages are rendered on request.

streak-forge dev

streak-forge pre-build

Reads the sitemap, renders all pages, and writes static HTML to out/.

streak-forge pre-build

package.json Scripts

A typical Streak project uses the following scripts:

"scripts": {
  "dev":        "concurrently ... \"bun run css-dev\" \"bun run dev:streak\"",
  "dev:streak": "streak-forge dev",
  "build":      "bun run css-build && streak-forge pre-build",
  "css-build":  "tailwindcss -i ./src/common/styles/input.css -o ./public/styles/tailwind.css",
  "start":      "python3 -m http.server 8000 --directory out"
}
ScriptWhat it does
devRuns CSS watch and streak-forge dev concurrently
dev:streakRuns the Streak dev server directly
buildCompiles Tailwind CSS then runs streak-forge pre-build
css-buildCompiles Tailwind CSS to public/styles/tailwind.css
startServes the out/ directory locally on port 8000

Running the Development Server

bun run dev

The dev server renders pages on demand and reloads on file changes.


Building the Static Site

bun run build

This runs streak-forge pre-build, which reads streak.sitemap.json, renders all pages, and writes the output to out/.

Each sitemap entry produces a folder:

out/
  <renderId>/
    index.html

Previewing the Build

Serve the out/ directory with any static file server. The start script uses Python:

python3 -m http.server 8000 --directory out

Navigate to port 8000 in your browser.


CSS / Tailwind

Streak projects use Tailwind CSS compiled at build time. The compiled CSS file is written to public/styles/tailwind.css and linked from layouts. There is no CSS-in-JS — all styles are generated ahead of time.