antlio 0.1.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.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ <p align="center">
2
+ <picture>
3
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/antlio/termfolio/main/assets/hero-dark.svg">
4
+ <img src="https://raw.githubusercontent.com/antlio/termfolio/main/assets/hero-light.svg" alt="antlio" width="410">
5
+ </picture>
6
+ </p>
7
+
8
+ anthony lio, a terminal portfolio.
9
+
10
+ ```sh
11
+ npx antlio
12
+ ```
13
+
14
+ Arrow keys (or `j`/`k`) to move, `Enter` to open the highlighted link in your
15
+ browser, letter shortcuts `s` site · `g` github · `x` x.com · `l` linkedin,
16
+ `q` to quit. Piped or non-interactive output prints the links as plain text.
17
+
18
+ Built with [ratatui](https://ratatui.rs). Site: <https://antl.io>
19
+
20
+ ## Develop
21
+
22
+ ```sh
23
+ cargo run # run the TUI
24
+ npm run prepare:npm # release build + copy binary into bin/
25
+ ```
package/bin/antlio ADDED
Binary file
package/bin/antlio.js ADDED
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from "node:child_process";
4
+ import { existsSync } from "node:fs";
5
+ import { dirname, join } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ const here = dirname(fileURLToPath(import.meta.url));
9
+ const exe = process.platform === "win32" ? ".exe" : "";
10
+ const bin = join(here, `antlio${exe}`);
11
+
12
+ if (!existsSync(bin)) {
13
+ console.error(
14
+ `antlio: no prebuilt binary for ${process.platform}/${process.arch}.\n` +
15
+ `See the portfolio at https://antl.io`,
16
+ );
17
+ process.exit(1);
18
+ }
19
+
20
+ const { status, error } = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
21
+ if (error) {
22
+ console.error(`antlio: ${error.message}`);
23
+ process.exit(1);
24
+ }
25
+ process.exit(status ?? 0);
package/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "antlio",
3
+ "version": "0.1.0",
4
+ "description": "anthony lio, terminal portfolio. Run: npx antlio",
5
+ "type": "module",
6
+ "bin": {
7
+ "antlio": "bin/antlio.js"
8
+ },
9
+ "engines": {
10
+ "node": ">=18"
11
+ },
12
+ "files": [
13
+ "bin"
14
+ ],
15
+ "scripts": {
16
+ "dev": "cargo run",
17
+ "build:release": "cargo build --release",
18
+ "prepare:npm": "npm run build:release && node ./scripts/copy-binary.mjs",
19
+ "prepack": "npm run prepare:npm"
20
+ },
21
+ "keywords": [
22
+ "portfolio",
23
+ "cli",
24
+ "tui"
25
+ ],
26
+ "author": "anthony lio",
27
+ "license": "MIT",
28
+ "homepage": "https://antl.io"
29
+ }