pokecn 0.1.0 → 0.1.2

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 (3) hide show
  1. package/README.md +20 -6
  2. package/dist/cli.js +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -6,7 +6,13 @@
6
6
 
7
7
  ## 安装
8
8
 
9
- ### 方式一:一键安装二进制(推荐,无需 Node / Bun
9
+ ### 方式一:npm 全局安装(需要 Node.js >= 18
10
+
11
+ ```bash
12
+ npm install -g pokecn
13
+ ```
14
+
15
+ ### 方式二:一键安装二进制(无需 Node / Bun)
10
16
 
11
17
  ```bash
12
18
  curl -fsSL https://raw.githubusercontent.com/BosenY/pokecn-cli/main/install.sh | sh
@@ -14,15 +20,19 @@ curl -fsSL https://raw.githubusercontent.com/BosenY/pokecn-cli/main/install.sh |
14
20
 
15
21
  支持 macOS(Apple Silicon / Intel)和 Linux(x64 / arm64)。
16
22
 
17
- ### 方式二:通过 Bun 全局安装
23
+ ### 方式三:通过 Bun 全局安装
18
24
 
19
25
  ```bash
20
26
  bun install -g pokecn
21
27
  ```
22
28
 
23
- ### 方式三:临时体验,无需安装
29
+ ### 方式四:临时体验,零安装
24
30
 
25
31
  ```bash
32
+ # Node.js
33
+ npx pokecn get 皮卡丘
34
+
35
+ # Bun
26
36
  bunx pokecn get 皮卡丘
27
37
  ```
28
38
 
@@ -83,7 +93,8 @@ pokecn get 皮卡丘 -T
83
93
 
84
94
  ## 技术栈
85
95
 
86
- - **运行时**: Bun
96
+ - **开发运行时**: Bun
97
+ - **发布产物**: Node.js 兼容的单文件 bundle(Node.js >= 18)
87
98
  - **语言**: TypeScript
88
99
  - **CLI 框架**: citty
89
100
  - **图片渲染**: terminal-image(自动检测 iTerm2/Kitty/ANSI 降级)
@@ -101,8 +112,11 @@ bun src/cli.ts get 皮卡丘
101
112
  # 测试
102
113
  bun test
103
114
 
104
- # 编译
105
- bun build --compile ./src/cli.ts --outfile bin/pokecn
115
+ # 编译多平台二进制
116
+ bun run build
117
+
118
+ # 打包 npm 发布产物(Node.js 兼容)
119
+ bun run build:npm
106
120
 
107
121
  # 重新生成中文名映射表
108
122
  bun scripts/build-name-map.ts
package/dist/cli.js CHANGED
@@ -88304,7 +88304,7 @@ async function renderSprite(id, shiny) {
88304
88304
  if (!buffer)
88305
88305
  return "";
88306
88306
  return terminal_image_default.buffer(buffer, {
88307
- width: "50%",
88307
+ width: "30%",
88308
88308
  preserveAspectRatio: true
88309
88309
  });
88310
88310
  }
@@ -92508,7 +92508,7 @@ function _getBuiltinFlags(long, short, userNames, userAliases) {
92508
92508
  return [`--${long}`, `-${short}`];
92509
92509
  }
92510
92510
  // package.json
92511
- var version = "0.1.0";
92511
+ var version = "0.1.2";
92512
92512
 
92513
92513
  // src/cli.ts
92514
92514
  var main = defineCommand({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pokecn",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "宝可梦终端百科全书 · Pokémon Terminal Encyclopedia",
5
5
  "type": "module",
6
6
  "bin": {