This guide keeps Stilo’s developer documentation consistent: the pages in
docs/, CONTRIBUTING.md, and the docstrings and comments in the code.
The user manual is not written here (see README.md).
| What | Where |
|---|---|
| Developer docs: architecture, setup, server, CLI, web app, editor, protocol, editor component | docs/, plain Markdown, index in docs/README.md |
| Contributing, changelog | CONTRIBUTING.md, CHANGELOG.md at the repository root |
| API details next to the code | Python docstrings, JSDoc comments |
The protocol is a contract. docs/protocol.md is the contract between
the web app and the server, and with any other server that speaks it.
Change it first, then src/stilo/server/ and web/src/api.js.
texl-editor
still use British spelling in places; fix it when you edit them.)| Use | For |
|---|---|
| document | one .texl file |
| folder | the folder that stilo serve serves |
| the web app | the whole user interface in the browser |
| the editor | the sheet of cells, <texl-editor> |
| cell | one part of a document, from its marker to the next |
| line | a cell, as the user sees it, by its number |
| tag | a <% %> tag |
| name | a Swan identifier (not “variable”, except in passing) |
| comment | a cell comment, <!--[ ... ]--> |
Write “Stilo”, “Texl” and “Swan” capitalized in prose, and stilo in code
font for the command. Write keys as Ctrl+Enter.
```texl blocks, Swan code in
```swan blocks, shell commands in ```sh blocks,
Python in ```python, JavaScript in ```js, and output
in ```text blocks.```texl block followed by a ```text block shows a
document and its exact rendering.Every entry has the same shape: a heading with the name in code font, a
signature block, a one-sentence summary that starts with a verb in the
third person (“Returns …”, “Creates …”), details, and an example where
it helps. Signatures use the language’s own notation: Python with type
hints, JavaScript as in the editor’s API reference
(component/api.md).
@param, @returns,
@type): they are the type checking, since there is no TypeScript.docs/, e.g.
docs/protocol.md.