The command line
The suwatte command builds your sources into .stt bundles and serves them on your local network for a test.
The @suwatte/toolchain package adds a suwatte command. It has two subcommands.
Build
npx suwatte build
The build makes these files:
- One
.sttbundle for each source, indist/sources. - One
dist/sources.jsonsource list. - A source-list webpage in
dist/index.html, with its stylesheet and script.
Options
| Option | What it does |
|---|---|
-f, --folder <folder> |
Changes the output folder. |
--timings |
Prints the time that each build phase took. |
The generated webpage gives a person a link to install each source when you host the output directory.
Serve
npx suwatte serve
The serve subcommand builds the catalog and then hosts it on your local network.
Options
| Option | What it does |
|---|---|
-p, --port <port> |
Sets the port. |
-f, --folder <folder> |
Changes the folder to serve. |
--timings |
Prints the time that each build phase took. |
Test on a device
- Run
npx suwatte serveon your computer. - Note the address that the command prints.
- Open Suwatte on a device that is on the same network.
- Go to Settings → Sources → Manage Sources.
- Add the address of your list.
- Install your source.
Raise the version number in the info property for each build. The app compares the version
number to decide if an update exists.
Read the logs
Your console.log output goes to the app. Read it in Settings → Advanced → Logs. This is the
main way to find a fault in a source that runs on a device.
To test without a device, use the emulator.