KScript docs
EN

Programs: kscript compile

Sites

A folder (or project) with no app.main but with an index.html, index.md, routes.kscript or api.kscript compiles to a program that serves the site, as kscript serve does. The site comes before main.kscript, so a website with a helper script still compiles to the site; name the script (or set app.main) to build that instead. index.kscript is a script, not a page, so it never makes a folder a site. It takes --port, --host and --env, and otherwise uses the serve settings in kscript.json:

Shell
kscript compile "Example Sites/team"
./"Example Sites/team/dist/linux-x64/team" --env production --port 8080