Skip to content

build

Terminal window
sloptor build [FLAGS] [PATH]

Compile the project to Luau (tsconfig outDir + include/).

Argument Description
[PATH] Project path: a tsconfig file, a directory containing one, or any path to search upward from
Flag Description Aliases
-p, --project [<PATH>] Project path, as the positional [PATH] (default: .)
-b, --build [<PATH>] Build project references, optionally from the given tsconfig
--rojo [<PATH>] Rojo project file (default: discovered)
--type <KIND> Override the project type [game, model, package]
Flag Description Aliases
-i, --include-path [<DIR>] Folder to copy the runtime files to (default: <project>/include) --includePath
--no-include[=<BOOL>] Do not copy the runtime include files --noInclude
--write-only-changed[=<BOOL>] Skip rewriting outputs whose contents are unchanged --writeOnlyChanged
Flag Description Aliases
--luau[=<BOOL>] Emit .luau files; --no-luau emits .lua (default: true)
--luau-types[=<BOOL>] Experimental: emit full Luau type annotations --luauTypes
--emit-declaration-only Only emit declaration files for a solution build (requires --build) --emitDeclarationOnly
--allow-comment-directives[=<BOOL>] Allow @ts-ignore, @ts-expect-error and @ts-nocheck --allowCommentDirectives
--log-truthy-changes[=<BOOL>] Log where Lua truthiness changes how a condition evaluates --logTruthyChanges
--write-transformed-files[=<BOOL>] Not supported by sloptor (parsed and ignored) --writeTransformedFiles
Flag Description Aliases
--optimized-loops[=<BOOL>] Numeric for-loop optimization; --no-optimized-loops turns it off (default: true) --optimizedLoops
--optimized-array-appends[=<BOOL>] Replace eligible Array.push calls in loops with indexed writes --optimizedArrayAppends
Flag Description Aliases
-w, --watch[=<BOOL>] Rebuild whenever an input changes
--use-polling[=<BOOL>] Poll for changes instead of using file-system events (requires --watch) --usePolling
--bell / --no-bell Ring the terminal bell when a rebuild flips between failing and passing
--clear / --no-clear Clear the screen before each rebuild (default: true)
Flag Description Aliases
--json / --no-json Print one machine-readable result object instead of styled output (NDJSON with --watch)
--verbose[=<BOOL>] Verbose logs and per-phase timings
--max-errors [<N>] Cap the code frames rendered on failure; 0 renders all (default: 50)
Flag Description Aliases
--builders <N> Projects to build concurrently (only with --build) (default: 4)
--checkers <N> Checkers per project (build and check) (default: 4)
--single-threaded[=<BOOL>] Serialize builders and checkers (overrides --builders and --checkers; tsgo-compatible) --singleThreaded
Flag Description Aliases
--timings <PATH> Write aggregate one-shot build timings as JSON (not with --watch)
Flag Description Aliases
-v, -V, --version Print sloptor's version
--color <WHEN> When to use colour [auto, always, never] (default: auto)
-h, --help Print help (see more with '--help')
Terminal window
sloptor build # compile ./tsconfig.json to Luau
sloptor build src/server # compile the project found from src/server upward
sloptor build -b tsconfig.solution.json --builders 8
sloptor build --json > result.json # one machine-readable result object
sloptor build --no-luau # emit .lua instead of .luau