specv 0.1.1 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 daiki-beppu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,18 +1,18 @@
1
1
  # specv
2
2
 
3
- カレントディレクトリの Markdown ファイルを GitHub 風にブラウザプレビューする CLI ツール。
3
+ A CLI tool that previews Markdown files in the current directory with GitHub-style rendering in your browser.
4
4
 
5
5
  ## Features
6
6
 
7
- - GitHub Flavored Markdown (GFM) レンダリング
8
- - シンタックスハイライト付きコードブロック + コピーボタン
9
- - Preview / Source 切替
10
- - ファイルツリー (サイドバー) + 検索
11
- - VSCode Quick Open (`Cmd+P`) with fzf ファジー検索
12
- - サイドバートグル (`Cmd+B`)
13
- - ダーク / ライトモード切替 (OS 追従 + 手動切替)
14
- - GitHub ダークテーマ準拠の配色
15
- - ポート自動検出 (衝突時に次のポートを試行)
7
+ - GitHub Flavored Markdown (GFM) rendering
8
+ - Syntax-highlighted code blocks with copy button
9
+ - Preview / Source toggle
10
+ - File tree (sidebar) with search
11
+ - VSCode-style Quick Open (`Cmd+P`) with fzf fuzzy search
12
+ - Sidebar toggle (`Cmd+B`)
13
+ - Dark / Light mode (follows OS preference + manual toggle)
14
+ - GitHub dark theme color scheme
15
+ - Automatic port detection (tries next port on conflict)
16
16
 
17
17
  ## Install
18
18
 
@@ -23,52 +23,63 @@ npm install -g specv
23
23
  ## Usage
24
24
 
25
25
  ```bash
26
- # カレントディレクトリの .md をプレビュー
26
+ # Preview .md files in the current directory
27
27
  specv
28
28
 
29
- # ポート指定
29
+ # Specify a port
30
30
  specv -p 3000
31
31
  ```
32
32
 
33
- ブラウザが自動で開き、Markdown ファイルを GitHub 風にレンダリング表示します。
33
+ A browser window opens automatically, rendering your Markdown files with GitHub-style formatting.
34
34
 
35
35
  ## Keyboard Shortcuts
36
36
 
37
- | Shortcut | Action |
38
- | ------------------ | ------------------------- |
39
- | `Cmd+P` / `Ctrl+P` | Quick Open (ファイル検索) |
40
- | `Cmd+B` / `Ctrl+B` | サイドバー開閉 |
37
+ | Shortcut | Action |
38
+ | ------------------ | ------------------- |
39
+ | `Cmd+P` / `Ctrl+P` | Quick Open (search) |
40
+ | `Cmd+B` / `Ctrl+B` | Toggle sidebar |
41
41
 
42
42
  ## Architecture
43
43
 
44
44
  ```
45
- Express Server (API) ─── React SPA (Vite build)
46
- /api/files FileTree + Preview + Source
47
- /api/file?path=... react-markdown + prism-react-renderer
45
+ Hono Server (API) ─── React SPA (Vite build)
46
+ /api/files FileTree + Preview + Source
47
+ /api/file?path=... react-markdown + prism-react-renderer
48
48
  ```
49
49
 
50
- - **Server:** Express 5 + commander (CLI)
50
+ - **Server:** Hono + @hono/node-server + commander (CLI)
51
51
  - **Client:** React 19 + Vite + Tailwind CSS v4
52
52
  - **Markdown:** react-markdown + remark-gfm
53
53
  - **Search:** fzf (fuzzy finder) + TanStack Hotkeys
54
- - **Security:** パストラバーサル検証、.md ファイルのみアクセス許可
54
+ - **Security:** Path traversal protection, restricted to .md files only
55
55
 
56
56
  ## Development
57
57
 
58
58
  ```bash
59
- # クライアント開発サーバー (HMR)
59
+ # Client dev server (HMR)
60
60
  pnpm dev:client
61
61
 
62
- # サーバー開発
62
+ # Server development
63
63
  pnpm dev:server
64
64
 
65
- # テスト
65
+ # Run tests
66
66
  pnpm test
67
67
 
68
- # ビルド
68
+ # Build
69
69
  pnpm build
70
70
  ```
71
71
 
72
+ ## CI/CD
73
+
74
+ Automated via GitHub Actions:
75
+
76
+ - **CI** — Runs lint / knip / typecheck / test / build on PRs and main pushes
77
+ - **Publish** — Publishes to npm on GitHub Release creation (Trusted Publishing)
78
+
79
+ ## Contributing
80
+
81
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
82
+
72
83
  ## License
73
84
 
74
- MIT
85
+ [MIT](LICENSE)