Rebrand to shout, add light mode, update docs
This commit is contained in:
parent
60eb31cfc9
commit
b04849cc5a
133
index.html
133
index.html
|
|
@ -3,21 +3,35 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>shout — test your CLI</title>
|
<title>shout — shell output tester</title>
|
||||||
<meta name="description" content="Write shell sessions. Run them as tests. That's it.">
|
<meta name="description" content="shell output tester">
|
||||||
<style>
|
<style>
|
||||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--bg: #0a0a0a;
|
--bg: #fff;
|
||||||
--fg: #b0b0b0;
|
--fg: #444;
|
||||||
--bright: #e0e0e0;
|
--bright: #1a1a1a;
|
||||||
--green: #4ec966;
|
--green: #1a7f37;
|
||||||
--red: #e55;
|
--red: #cf222e;
|
||||||
--dim: #555;
|
--dim: #888;
|
||||||
--accent: #4ec966;
|
--accent: #1a7f37;
|
||||||
--code-bg: #111;
|
--code-bg: #f5f5f5;
|
||||||
--border: #222;
|
--border: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--bg: #0a0a0a;
|
||||||
|
--fg: #b0b0b0;
|
||||||
|
--bright: #e0e0e0;
|
||||||
|
--green: #4ec966;
|
||||||
|
--red: #e55;
|
||||||
|
--dim: #555;
|
||||||
|
--accent: #4ec966;
|
||||||
|
--code-bg: #111;
|
||||||
|
--border: #222;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
html { font-size: 16px; }
|
html { font-size: 16px; }
|
||||||
|
|
@ -34,7 +48,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding: 6rem 0 3rem;
|
padding: 6rem 0 2.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
|
@ -79,8 +93,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
padding: 3rem 0;
|
padding: 0 0 2em 0;
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
|
@ -125,32 +138,6 @@
|
||||||
.exit-code { color: var(--red); }
|
.exit-code { color: var(--red); }
|
||||||
.pass { color: var(--green); }
|
.pass { color: var(--green); }
|
||||||
|
|
||||||
.features {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feature {
|
|
||||||
padding: 1.2rem;
|
|
||||||
background: var(--code-bg);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feature h3 {
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: var(--bright);
|
|
||||||
margin-bottom: 0.4rem;
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.feature p {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
color: var(--dim);
|
|
||||||
margin: 0;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
padding: 3rem 0;
|
padding: 3rem 0;
|
||||||
|
|
@ -180,7 +167,6 @@
|
||||||
@media (max-width: 520px) {
|
@media (max-width: 520px) {
|
||||||
header { padding: 3rem 0 2rem; }
|
header { padding: 3rem 0 2rem; }
|
||||||
h1 { font-size: 2rem; }
|
h1 { font-size: 2rem; }
|
||||||
.features { grid-template-columns: 1fr; }
|
|
||||||
section { padding: 2rem 0; }
|
section { padding: 2rem 0; }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -189,9 +175,9 @@
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<h1><span>$</span> shout</h1>
|
<h1><span>$</span> shout</h1>
|
||||||
<p class="tagline">Write shell sessions. Run them as tests.</p>
|
<p class="tagline">shell output tester</p>
|
||||||
<div class="install" onclick="navigator.clipboard.writeText('bun install -g @because/shout')">
|
<div class="install" onclick="navigator.clipboard.writeText('bun install -g @because/shout --registry=https://npm.nose.space')">
|
||||||
<span class="prompt">$</span> <span class="cmd">bun install -g @because/shout</span>
|
<span class="prompt">$</span> <span class="cmd">bun install -g @because/shout --registry=https://npm.nose.space</span>
|
||||||
<span class="hint">click to copy</span>
|
<span class="hint">click to copy</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -207,8 +193,9 @@
|
||||||
<span class="exit-code">[1]</span>
|
<span class="exit-code">[1]</span>
|
||||||
|
|
||||||
<span class="prompt">$</span> <span class="cmd">brew --version</span>
|
<span class="prompt">$</span> <span class="cmd">brew --version</span>
|
||||||
<span class="output">Homebrew </span><span class="wildcard">...</span></code></pre>
|
<span class="output">Homebrew 5</span><span class="wildcard">...</span></code></pre>
|
||||||
<p><code class="wildcard">...</code> matches anything — inline or across lines. <code class="exit-code">[1]</code> asserts the exit code.</p>
|
<p><code class="wildcard">...</code> matches anything — inline or across lines.</p>
|
||||||
|
<p><code class="exit-code">[1]</code> asserts the exit code.</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|
@ -226,33 +213,33 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h2>Features</h2>
|
<h2>Usage</h2>
|
||||||
<div class="features">
|
<pre><code><span class="prompt">$</span> <span class="cmd">shout --help</span>
|
||||||
<div class="feature">
|
<span class="output">Usage: shout [options] [files...]
|
||||||
<h3>Wildcards</h3>
|
|
||||||
<p><code>...</code> matches anything — inline for partial lines, standalone for multiple lines.</p>
|
shell output tester.
|
||||||
</div>
|
|
||||||
<div class="feature">
|
Arguments:
|
||||||
<h3>Exit codes</h3>
|
files Files or directories to test
|
||||||
<p><code>[N]</code> asserts a specific exit code. <code>[*]</code> matches any non-zero code.</p>
|
|
||||||
</div>
|
Options:
|
||||||
<div class="feature">
|
-u, --update Rewrite expected output in-place with actual output
|
||||||
<h3>Parallel</h3>
|
-k, --keep Keep temp directories after run
|
||||||
<p><code>--parallel</code> runs test files concurrently. Each gets its own shell.</p>
|
--clean-env Start with empty environment
|
||||||
</div>
|
--path <path> Prepend <path> to PATH (repeatable)
|
||||||
<div class="feature">
|
--timeout <dur> Per-command timeout (default: "10s")
|
||||||
<h3>Timeouts</h3>
|
-v, --verbose Print each command as it runs
|
||||||
<p><code>--timeout 5s</code> per-command timeout. Supports <code>ms</code>, <code>s</code>, <code>m</code>.</p>
|
--parallel Run files in parallel
|
||||||
</div>
|
-h, --help display help for command</span></code></pre>
|
||||||
<div class="feature">
|
</section>
|
||||||
<h3>PATH control</h3>
|
|
||||||
<p><code>--path ./bin</code> prepends to PATH. Test your local builds.</p>
|
<section>
|
||||||
</div>
|
<h2>Environment</h2>
|
||||||
<div class="feature">
|
<p>Shout sets these variables before running your commands:</p>
|
||||||
<h3>Verbose</h3>
|
<pre><code><span class="bright">HOME</span> <span class="dim">→</span> <span class="output">temp directory for this test file</span>
|
||||||
<p><code>-v</code> prints each command as it runs. See what's happening.</p>
|
<span class="bright">SHOUT_DIR</span> <span class="dim">→</span> <span class="output">same temp directory</span>
|
||||||
</div>
|
<span class="bright">PATH</span> <span class="dim">→</span> <span class="output">prepended with --path dirs, if any</span></code></pre>
|
||||||
</div>
|
<p>Each file runs in its own temp directory. <code>--clean-env</code> starts with an empty environment instead of inheriting yours.</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@because/shout",
|
"name": "@because/shout",
|
||||||
"version": "0.0.2",
|
"version": "0.0.2",
|
||||||
"description": "test shell output",
|
"description": "shell output tester",
|
||||||
"module": "src/index.ts",
|
"module": "src/index.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ export async function runFile(
|
||||||
: { ...process.env as Record<string, string> }
|
: { ...process.env as Record<string, string> }
|
||||||
|
|
||||||
env["HOME"] = tmpDir
|
env["HOME"] = tmpDir
|
||||||
env["CUE_DIR"] = tmpDir
|
env["SHOUT_DIR"] = tmpDir
|
||||||
|
|
||||||
if (options.pathDirs?.length) {
|
if (options.pathDirs?.length) {
|
||||||
env["PATH"] = options.pathDirs.join(":") + ":" + (env["PATH"] ?? "")
|
env["PATH"] = options.pathDirs.join(":") + ":" + (env["PATH"] ?? "")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user