Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brignano",
"version": "2.0.0",
"version": "2.0.1",
"type": "module",
"engines": {
"node": ">=20"
Expand Down
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ npm run build
node dist/card.js
```

> **Running it inside this repo:** `npx brignano` resolves to *this* package's
> `bin` (`dist/`), not the published one — and `dist/` is gitignored. On a fresh
> clone it will exit silently until you build. Use `npm run dev` (runs the
> TypeScript directly, no build step), or `npm run build` first. To exercise the
> published package instead, run `npx brignano` from any other directory.

Source lives in `src/` (split into small modules — `card.ts` is the entry/`bin`
target) and compiles to `dist/` via `tsc`. `npm run dev` runs the TypeScript
directly through `tsx`; `npm run lint` and `npm run format` use
Expand Down
3 changes: 0 additions & 3 deletions src/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { animateBanner, renderBanner } from './banner.js';
import { renderCard } from './cardBox.js';
import { funFacts, pick, profile, taglines } from './data.js';
import {
clearConsole,
isInteractive,
parseFlags,
readVersion,
Expand Down Expand Up @@ -74,8 +73,6 @@ async function main(): Promise<void> {
// overlaps the banner render. Skipped entirely when non-interactive/CI.
const livePromise = shouldFetchLive(flags) ? fetchLive() : Promise.resolve(null);

clearConsole();

// Banner first: an animated violet shimmer when we can animate, otherwise the
// static gradient.
if (animate) {
Expand Down
14 changes: 0 additions & 14 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,3 @@ export function shouldAnimate(flags: Flags): boolean {
export function shouldFetchLive(flags: Flags): boolean {
return isInteractive(flags);
}

export function clearConsole(): void {
const out = process.stdout as NodeJS.WriteStream & { clear?: () => void };
if (typeof out.clear === 'function') {
try {
out.clear();
} catch {
/* ignore */
}
}
if (process.stdout.isTTY) {
process.stdout.write('\u001b[2J\u001b[0f');
}
}