diff --git a/package-lock.json b/package-lock.json index 00af267..968aa80 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "brignano", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "brignano", - "version": "2.0.0", + "version": "2.0.1", "license": "ISC", "dependencies": { "@inquirer/prompts": "^8.6.0", diff --git a/package.json b/package.json index 2ae85c7..50236c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "brignano", - "version": "2.0.0", + "version": "2.0.1", "type": "module", "engines": { "node": ">=20" diff --git a/readme.md b/readme.md index 9ebc6fd..56aa9cd 100644 --- a/readme.md +++ b/readme.md @@ -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 diff --git a/src/card.ts b/src/card.ts index 356b123..534751f 100644 --- a/src/card.ts +++ b/src/card.ts @@ -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, @@ -74,8 +73,6 @@ async function main(): Promise { // 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) { diff --git a/src/env.ts b/src/env.ts index 0a091a7..d5f5fc5 100644 --- a/src/env.ts +++ b/src/env.ts @@ -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'); - } -}