skeudo 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -2
  3. package/dist/skeudo.js +6916 -0
  4. package/package.json +38 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The Skeudo authors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,75 @@
1
- # Temporary Holding Version
1
+ # skeudo
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ > Experimental, 0.x: the format and the commands can change in any minor version. [CHANGELOG.md](https://github.com/wlezzar/skeudo/blob/main/CHANGELOG.md) lists the changes.
4
+
5
+ Checks [Skeudo](https://github.com/wlezzar/skeudo) sketches and renders them as standalone HTML pages. A sketch is pseudocode for code review where every outside effect is tagged, or, when it starts with a `data` line, a data model drawn as tables and a story of how their rows change. The format is defined in [spec/spec.md](https://github.com/wlezzar/skeudo/blob/main/spec/spec.md).
6
+
7
+ ```sh
8
+ npm install -g skeudo # or run it once with npx skeudo
9
+ skeudo check docs/ # warnings in every sketch under docs/
10
+ skeudo render pr-123.md -o pr.html # a page to send to someone
11
+ ```
12
+
13
+ It needs Node 22 or later.
14
+
15
+ ## Input
16
+
17
+ - A `.md` or `.markdown` file is Markdown: every ` ```skeudo ` fence in it is a sketch (` ```sketch ` works too).
18
+ - A `.skeudo` file is a sketch.
19
+ - A directory is searched for both, skipping hidden folders and `node_modules`.
20
+ - With no path, or with `-`, the input is read from stdin. Any input other than a `.md`, `.markdown` or `.skeudo` file is Markdown when it has a sketch fence, and a sketch otherwise.
21
+
22
+ ## check
23
+
24
+ ```
25
+ skeudo check [path...]
26
+ ```
27
+
28
+ Prints the parser's warnings, listed under Warnings in each view's spec, at their lines in the file, then a summary:
29
+
30
+ ```
31
+ docs/refunds.md:13: warning: ::fail needs a name, as in ::fail:NotFound.
32
+ docs/refunds.md:18: warning: ::write needs the system it touches, as in ::write:postgres.
33
+ Checked 4 sketches in 3 files: 2 warnings.
34
+ ```
35
+
36
+ It exits with 0 when there are no warnings, 1 when there are, and 2 when a file can't be read or the command is wrong. To check a sketch before saving it, pipe it in:
37
+
38
+ ```sh
39
+ skeudo check <<'EOF'
40
+ get_user(id):
41
+ row = find(id) ::read:postgres.users
42
+ EOF
43
+ ```
44
+
45
+ ## render
46
+
47
+ ```
48
+ skeudo render [file] [-o out.html] [--src-base <url>]
49
+ ```
50
+
51
+ Writes one HTML page with the styles and the script inlined (variable highlighting, explanations on hover, and stepping through data sketches), so it loads nothing from elsewhere and can be sent as a file. It follows the reader's light or dark mode. The page goes to stdout unless `-o` names a file, and warnings go to stderr; a sketch with warnings still renders.
52
+
53
+ The title is the front matter's `title`, or else the first `#` heading, the sketch's function name, or the file name.
54
+
55
+ `::src` locations link to the repository a sketch names with `::repo`, on GitHub, GitLab or Bitbucket, at the sketch's revision. A sketch that names none links under the front matter's `srcBase`. `--src-base` overrides both, for every sketch on the page:
56
+
57
+ ```markdown
58
+ ---
59
+ title: shop a1b2c3d
60
+ srcBase: https://github.com/org/shop/blob/a1b2c3d/
61
+ ---
62
+ ```
63
+
64
+ ## From the repository
65
+
66
+ To try a change, build the CLI from the source:
67
+
68
+ ```sh
69
+ pnpm install
70
+ pnpm build:cli # apps/cli/dist/skeudo.js, one file with no dependencies
71
+ node apps/cli/dist/skeudo.js check docs/
72
+
73
+ pnpm package:cli # apps/cli/skeudo.tgz
74
+ npm install -g apps/cli/skeudo.tgz # puts this build on your PATH
75
+ ```