Tools
The command line
strict-script <command> [options]
check <paths…> Say what is refused in the .sts files named, or found under the directories named
build <paths…> [--out dir] The same, then write a .js, a .d.ts and a .js.map for each file; nothing is written
when anything is refused. Without --out they are written beside the sources
run <file.sts> [args…] Build the file and what it imports, then call its exported `main`
| Exit code | Meaning |
|---|---|
| 0 | Nothing is refused |
| 1 | Something is refused, or the main that was run gave an Err |
| 2 | The command could not be read: no command, an unknown one, a path that is not there |
A file that is named is read with every file it imports. With one directory and --out, the outputs keep the paths
they have under that directory; otherwise paths are counted from where the command runs.
build writes nothing when one file is refused: there is no output of a program that did not pass, not even for
the files that did.
run calls main(args) with the arguments that follow the file. A main that gives a Result says by it whether the
program went well: an Err is printed and the exit code is 1.
The emitted modules import @strict-script/std: a project that runs them has that package among its dependencies.
run needs nothing installed beside the command line itself.
A message is one line, file:line:column rule message, and a help: line below that says what to write instead.