tanmoy-das 0.0.0-stage → 1.0.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/README.md +18 -2
  2. package/card.mjs +38 -0
  3. package/cli.mjs +4 -0
  4. package/package.json +12 -4
package/README.md CHANGED
@@ -1,3 +1,19 @@
1
- # Temporary Holding Version
1
+ # tanmoy-das
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
+ My business card, in your terminal:
4
+
5
+ ```sh
6
+ npx tanmoy-das
7
+ ```
8
+
9
+ Full stack developer in Jamshedpur, India. Portfolio: https://tanmoydas.runs-on.dev
10
+
11
+ ## Publishing (for me)
12
+
13
+ ```sh
14
+ cd packages/card
15
+ npm login
16
+ npm publish --access public
17
+ ```
18
+
19
+ Bump `version` in package.json before each new publish. No dependencies, nothing collected or sent.
package/card.mjs ADDED
@@ -0,0 +1,38 @@
1
+ // Tanmoy Das's terminal business card. No dependencies, so `npx tanmoy-das` starts instantly.
2
+ // Also imported by scripts/welcome.mjs in the portfolio repo, so both show the same card.
3
+
4
+ const tty = process.stdout.isTTY && !process.env.NO_COLOR;
5
+ const esc = (code) => (s) => (tty ? `\x1b[${code}m${s}\x1b[0m` : s);
6
+ const lime = esc("38;2;204;255;0"), pink = esc("38;2;255;46;151"), blue = esc("38;2;46;107;255");
7
+ const bold = esc("1"), dim = esc("2");
8
+
9
+ /** A clickable link (OSC 8) in terminals that support it; plain text elsewhere. */
10
+ export const link = (url, text = url) => (tty ? `\x1b]8;;${url}\x07${text}\x1b]8;;\x07` : text);
11
+
12
+ export const LINKS = [
13
+ ["Portfolio", "https://tanmoydas.runs-on.dev", "tanmoydas.runs-on.dev"],
14
+ ["GitHub", "https://github.com/Tan12d", "github.com/Tan12d"],
15
+ ["LinkedIn", "https://www.linkedin.com/in/tanmoy-das-tan12d", "in/tanmoy-das-tan12d"],
16
+ ["Instagram", "https://www.instagram.com/tanmoydas.dev/", "@tanmoydas.dev"],
17
+ ];
18
+
19
+ const visible = (s) => s.replace(/\x1b\]8;;[^\x07]*\x07/g, "").replace(/\x1b\[[0-9;]*m/g, "").length;
20
+
21
+ export function renderCard() {
22
+ const lines = [
23
+ `${bold(lime("Tanmoy Das"))} ${dim("·")} Full stack developer`,
24
+ dim("Jamshedpur, India · TypeScript, React, Next.js, Node.js"),
25
+ "",
26
+ ...LINKS.map(([label, url, text]) => `${pink(label.padEnd(10))} ${link(url, blue(text))}`),
27
+ "",
28
+ `${dim("Say hi:")} ${link("https://tanmoydas.runs-on.dev/contact", lime("tanmoydas.runs-on.dev/contact"))}`,
29
+ `${dim("Card:")} npx tanmoy-das`,
30
+ ];
31
+ const width = Math.max(...lines.map(visible)) + 4;
32
+ const edge = (l, r) => dim(l + "─".repeat(width - 2) + r);
33
+ return [
34
+ edge("╭", "╮"),
35
+ ...lines.map((l) => `${dim("│")} ${l}${" ".repeat(width - 3 - visible(l))}${dim("│")}`),
36
+ edge("╰", "╯"),
37
+ ].join("\n");
38
+ }
package/cli.mjs ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { renderCard } from "./card.mjs";
3
+
4
+ console.log("\n" + renderCard() + "\n");
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "tanmoy-das",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Tanmoy Das, full stack developer, as a business card in your terminal. Run: npx tanmoy-das",
5
+ "type": "module",
6
+ "bin": { "tanmoy-das": "cli.mjs" },
7
+ "exports": "./card.mjs",
8
+ "files": ["cli.mjs", "card.mjs", "README.md"],
9
+ "engines": { "node": ">=18" },
10
+ "keywords": ["card", "business-card", "npx", "cli", "tanmoy-das"],
11
+ "author": "Tanmoy Das (https://tanmoydas.runs-on.dev)",
12
+ "homepage": "https://tanmoydas.runs-on.dev",
13
+ "license": "MIT"
14
+ }