difit 1.0.6 → 1.0.8

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 CHANGED
@@ -14,6 +14,7 @@ A lightweight command-line tool that spins up a local web server to display Git
14
14
  - ⚡ **Zero Config**: Just run `npx reviewit <commit>` and it works
15
15
  - 🔐 **Local Only**: Never exposes data over network - runs on localhost only
16
16
  - 🛠️ **Modern Stack**: React 18 + TypeScript + Tailwind CSS
17
+ - 🎨 **Syntax Highlighting**: Dynamic language loading for Bash, PHP, SQL, Ruby, Java, and more
17
18
  - ✨ **100% vibe coding**: Built with pure coding energy and good vibes
18
19
 
19
20
  ## 📦 Installation
@@ -57,6 +58,44 @@ npx reviewit . # uncommitted changes
57
58
 
58
59
  > **Note**: Use `.` as the commit-ish to review uncommitted changes in your working directory!
59
60
 
61
+ ## 💬 Comment System
62
+
63
+ ReviewIt includes an inline commenting system that integrates with Claude Code:
64
+
65
+ 1. **Add Comments**: Click on any diff line to add a comment
66
+ 2. **Edit Comments**: Edit existing comments with the edit button
67
+ 3. **Generate Prompts**: Comments include a "Copy Prompt" button that formats the context for Claude Code
68
+ 4. **Copy All**: Use "Copy All Prompt" to copy all comments in a structured format
69
+ 5. **Persistent Storage**: Comments are saved in browser localStorage per commit
70
+
71
+ ### Comment Prompt Format
72
+
73
+ ```
74
+ File: src/components/Button.tsx
75
+ Line: 42
76
+ Comment: This function name should probably be more specific
77
+ ```
78
+
79
+ ## 🎨 Syntax Highlighting
80
+
81
+ ReviewIt supports syntax highlighting for multiple programming languages with dynamic loading:
82
+
83
+ ### Supported Languages
84
+
85
+ - **JavaScript/TypeScript**: `.js`, `.jsx`, `.ts`, `.tsx`
86
+ - **Web Technologies**: HTML, CSS, JSON, XML, Markdown
87
+ - **Shell Scripts**: `.sh`, `.bash`, `.zsh`, `.fish` files
88
+ - **Backend Languages**: PHP, SQL, Ruby, Java
89
+ - **Systems Languages**: C, C++, Rust, Go
90
+ - **Others**: Python, Swift, Kotlin, YAML
91
+
92
+ ### Dynamic Language Loading
93
+
94
+ - Languages are loaded on-demand for better performance
95
+ - Automatic language detection from file extensions
96
+ - Fallback to plain text for unsupported languages
97
+ - Safe dependency resolution (e.g., PHP requires markup-templating)
98
+
60
99
  ## 🛠️ Development
61
100
 
62
101
  ```bash
@@ -94,30 +133,13 @@ pnpm run typecheck
94
133
  - **Development mode**: Uses Vite's dev server for hot reload and fast development
95
134
  - **Production mode**: Serves built static files (used by npx and production builds)
96
135
 
97
- ## 💬 Comment System
98
-
99
- ReviewIt includes an inline commenting system that integrates with Claude Code:
100
-
101
- 1. **Add Comments**: Click on any diff line to add a comment
102
- 2. **Edit Comments**: Edit existing comments with the edit button
103
- 3. **Generate Prompts**: Comments include a "Copy Prompt" button that formats the context for Claude Code
104
- 4. **Copy All**: Use "Copy All Prompt" to copy all comments in a structured format
105
- 5. **Persistent Storage**: Comments are saved in browser localStorage per commit
106
-
107
- ### Comment Prompt Format
108
-
109
- ```
110
- File: src/components/Button.tsx
111
- Line: 42
112
- Comment: This function name should probably be more specific
113
- ```
114
-
115
136
  ## 🏗️ Architecture
116
137
 
117
138
  - **CLI**: Commander.js for argument parsing
118
139
  - **Backend**: Express server with simple-git for diff processing
119
140
  - **Frontend**: React 18 + TypeScript + Vite
120
141
  - **Styling**: Tailwind CSS v4 with GitHub-like dark theme
142
+ - **Syntax Highlighting**: Prism.js with dynamic language loading
121
143
  - **Testing**: Vitest for unit tests
122
144
  - **Quality**: ESLint, Prettier, lefthook pre-commit hooks
123
145
 
package/dist/cli/index.js CHANGED
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
+ import pkg from '../../package.json' with { type: 'json' };
3
4
  import { startServer } from '../server/server.js';
4
5
  import { validateCommitish } from './utils.js';
5
6
  const program = new Command();
6
7
  program
7
8
  .name('reviewit')
8
9
  .description('A lightweight Git diff viewer with GitHub-like interface')
9
- .version('0.1.0')
10
+ .version(pkg.version)
10
11
  .argument('[commit-ish]', 'Git commit, tag, branch, or HEAD~n reference (default: HEAD)', 'HEAD')
11
12
  .option('--port <port>', 'preferred port (auto-assigned if occupied)', parseInt)
12
13
  .option('--no-open', 'do not automatically open browser')