@enke.dev/logbox 0.0.1 → 0.0.2
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.
- package/README.md +16 -26
- package/dist/cli.mjs +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,31 +6,24 @@ wrapped command's output scrolls above it, unaltered — colors, spinners and al
|
|
|
6
6
|
```
|
|
7
7
|
[dev:docs] vite v7.1.0 ready in 431 ms
|
|
8
8
|
[dev:components] build started…
|
|
9
|
-
╭─ dev servers
|
|
10
|
-
│ docs..............................................https://localhost:5173
|
|
11
|
-
│ components (web)..................................https://localhost:5174
|
|
12
|
-
│ components (react)................................https://localhost:5175
|
|
13
|
-
|
|
9
|
+
╭─ dev servers ────────────────────────────────────────────────────────────╮
|
|
10
|
+
│ docs..............................................https://localhost:5173 │
|
|
11
|
+
│ components (web)..................................https://localhost:5174 │
|
|
12
|
+
│ components (react)................................https://localhost:5175 │
|
|
13
|
+
╰──────────────────────────────────────────────────────────────────────────╯
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## tl;dr
|
|
17
17
|
|
|
18
18
|
```sh
|
|
19
|
-
#
|
|
20
|
-
npm i -D @enke.dev/logbox
|
|
21
|
-
# or globally
|
|
22
|
-
npm i -g @enke.dev/logbox
|
|
23
|
-
|
|
24
|
-
# wrap whatever you already run
|
|
25
|
-
logbox pnpm -r --parallel --stream dev
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Or without installing:
|
|
29
|
-
|
|
30
|
-
```sh
|
|
19
|
+
# invoke directly
|
|
31
20
|
npx @enke.dev/logbox pnpm -r --parallel --stream dev
|
|
32
21
|
pnpm dlx @enke.dev/logbox pnpm -r --parallel --stream dev
|
|
33
22
|
bunx --bun @enke.dev/logbox pnpm -r --parallel --stream dev
|
|
23
|
+
|
|
24
|
+
# or install and run globally
|
|
25
|
+
npm i -g @enke.dev/logbox
|
|
26
|
+
logbox pnpm -r --parallel --stream dev
|
|
34
27
|
```
|
|
35
28
|
|
|
36
29
|
Typical use is a `package.json` script:
|
|
@@ -43,11 +36,11 @@ Typical use is a `package.json` script:
|
|
|
43
36
|
}
|
|
44
37
|
```
|
|
45
38
|
|
|
39
|
+
<img src="https://enke-dev.github.io/logbox/logbox.gif" alt="logbox demo" width="100%">
|
|
40
|
+
|
|
46
41
|
## How it works
|
|
47
42
|
|
|
48
|
-
The box lives in terminal lines that are reserved by shrinking the scroll region, so it is not part
|
|
49
|
-
of the output stream: nothing scrolls it away, and nothing is rewritten or filtered on the way
|
|
50
|
-
through. Redraws are coalesced, so a burst of output costs one render.
|
|
43
|
+
The box lives in terminal lines that are reserved by shrinking the scroll region, so it is not part of the output stream: nothing scrolls it away, and nothing is rewritten or filtered on the way through. Redraws are coalesced, so a burst of output costs one render.
|
|
51
44
|
|
|
52
45
|
Without a TTY (pipes, CI logs) there is nothing to pin the box to, so the content is printed once up
|
|
53
46
|
front as a flat list and the child inherits stdio directly.
|
|
@@ -67,9 +60,8 @@ Content is an **array of rows**; each row is an **array of strings**:
|
|
|
67
60
|
|
|
68
61
|
### `.logbox.json`
|
|
69
62
|
|
|
70
|
-
Looked up in the current directory, then every parent up to the filesystem root — so a file in the
|
|
71
|
-
|
|
72
|
-
as a global fallback. The nearest file wins.
|
|
63
|
+
Looked up in the current directory, then every parent up to the filesystem root — so a file in the repo root is found from any nested cwd — and finally in the user home directory (`~/.logbox.json`) as a global fallback.\
|
|
64
|
+
The nearest file wins.
|
|
73
65
|
|
|
74
66
|
Bare rows:
|
|
75
67
|
|
|
@@ -93,9 +85,7 @@ Or the object form, which adds a title:
|
|
|
93
85
|
}
|
|
94
86
|
```
|
|
95
87
|
|
|
96
|
-
The JSON schema is published
|
|
97
|
-
**<https://enke-dev.github.io/logbox/logbox.schema.json>** — reference it via `$schema` for editor
|
|
98
|
-
completion and validation.
|
|
88
|
+
The JSON schema is published at **<https://enke-dev.github.io/logbox/logbox.schema.json>** — reference it via `$schema` for editor completion and validation.
|
|
99
89
|
|
|
100
90
|
### Inline
|
|
101
91
|
|
package/dist/cli.mjs
CHANGED