Ema apps have a basic CLI argument structure that you can invoke in two possible ways:
-
run
subcommand (or, no subcommand specified): Run the Live Server.-
A random port is used unless you specify one explicitly (
--port
) -
Pass
--no-ws
if you want to disable the “live” aspect of the server.
-
A random port is used unless you specify one explicitly (
-
gen
subcommand: Generate the static site, instead of starting up the Live Server
The subcommand is passed as the Ema.CLI.Action
type to your siteInput
function in EmaSite.
You can also use runEmaWith
if you are manually handling the CLI arguments yourself and delegating to ema using Ema.CLI
wherever appropriate.