Skip to content

Commit dd8a5d4

Browse files
authored
Merge pull request #3 from KebanFiru/feat/implement_basic_usage
Add LICENSE file, update README with detailed features, and enhance p…
2 parents 54f63f4 + 4af576b commit dd8a5d4

5 files changed

Lines changed: 165 additions & 28 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.vscode
22
node_modules/
33
out/
4-
pnpm-lock.yaml
4+
5+
.npmrc

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 KebanFiru
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.

README.md

Lines changed: 130 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,147 @@
1-
# CodeCount
1+
# CodeCount - VS Code Extension
2+
3+
<!-- Badges -->
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![VS Code](https://img.shields.io/badge/VS%20Code-1.108.2+-blue)](https://code.visualstudio.com/)
6+
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9+-blue)](https://www.typescriptlang.org/)
7+
8+
> Quickly analyze your project's codebase by counting lines of code, comments, and get insights organized by file types.
29
310
## Overview
411

5-
CodeCount is a VS Code extension that counts lines of code in your workspace and shows stats in a dedicated view.
12+
**CodeCount** is a powerful VS Code extension that provides comprehensive code metrics for your projects. Instantly see how many lines of code, comments, and blank lines your workspace contains. Get detailed breakdowns by file type, understand code distribution, and track your project's scale.
13+
14+
Perfect for developers, project managers, and teams who need quick insights into codebase size and complexity.
615

716
## Features
817

9-
- Count total lines of code in the workspace.
10-
- Count lines per file and by file extension.
11-
- Refreshable stats view in the Activity Bar.
18+
- **Workspace Analysis** - Get total line counts for your entire project
19+
- **File-by-File Breakdown** - See statistics for individual files
20+
- **Extension-Based Statistics** - Analyze code distribution across file types (TypeScript, JavaScript, Python, etc.)
21+
- **Comment Detection** - Identify and count comment lines separately
22+
- **Real-Time Refresh** - Update stats anytime with a single click
23+
- **Sidebar Integration** - Dedicated panel in VS Code's Activity Bar
24+
- **Gitignore Support** - Respects your `.gitignore` patterns automatically
25+
- **⏱Performance Optimized** - Fast analysis even for large projects
26+
27+
## 📋 Commands
28+
29+
Access CodeCount commands via the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`):
30+
31+
| Command | Description |
32+
|---------|-------------|
33+
| `CodeCount: Count Lines of Code` | Analyze the current active file |
34+
| `CodeCount: Count Lines of Code in All Files` | Analyze entire workspace |
35+
| `CodeCount: Count Lines of Code by Extension` | Get breakdown by file type |
36+
| `CodeCount: Refresh CodeCount Stats` | Refresh sidebar statistics |
37+
38+
## 📦 Requirements
39+
40+
- **VS Code:** 1.108.2 or newer
41+
- **Git:** Required for repository recognition (optional, but recommended)
42+
43+
## 🚀 Quick Start
44+
45+
### Installation
46+
47+
1. Open VS Code
48+
2. Go to Extensions (`Ctrl+Shift+X` / `Cmd+Shift+X`)
49+
3. Search for "CodeCount"
50+
4. Click **Install**
51+
5. Reload VS Code if prompted
52+
53+
### Usage
54+
55+
#### Method 1: Using Commands
56+
- Open Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
57+
- Type "CodeCount" to see available commands
58+
- Select the command you want to run
59+
60+
#### Method 2: Using Sidebar
61+
- Click the **CodeCount** icon in the Activity Bar (left sidebar)
62+
- View current statistics
63+
- Click the refresh button to update
64+
65+
#### Example Output
66+
```
67+
Total lines in workspace (145 files): 25,847
68+
Comment lines: 3,421
69+
```
70+
71+
## 🛠️ Development
72+
73+
### Prerequisites
74+
- Node.js 18+
75+
- pnpm (recommended) or npm
76+
77+
### Setup
78+
79+
## 📚 Configuration
80+
81+
CodeCount respects your project's `.gitignore` file, automatically excluding:
82+
- `node_modules/`
83+
- `dist/` and `build/`
84+
- `.git/` directories
85+
- And any patterns defined in `.gitignore`
86+
87+
## 🤝 Contributing
88+
89+
We welcome contributions! Here's how to help:
90+
91+
### Getting Started
92+
1. **Fork** the repository
93+
2. **Create** a feature branch: `git checkout -b feature/amazing-feature`
94+
3. **Make** your changes
95+
4. **Test** thoroughly
96+
5. **Commit** with clear messages: `git commit -m 'Add amazing feature'`
97+
6. **Push** to your branch: `git push origin feature/amazing-feature`
98+
7. **Open** a Pull Request
99+
100+
### Development Guidelines
101+
- Follow TypeScript best practices
102+
- Keep code clean and well-documented
103+
- Run `pnpm run lint` before committing
104+
- Write meaningful commit messages
105+
- Test changes in the Extension Development Host
106+
107+
### Code Style
108+
- Use TypeScript with strict mode enabled
109+
- Follow ESLint rules (run `pnpm run lint`)
110+
- Use descriptive variable and function names
111+
- Add comments for complex logic
112+
113+
## License
114+
115+
This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.
116+
117+
## Bug Reports & Feature Requests
12118

13-
## Commands
119+
Have a bug to report or feature to suggest?
14120

15-
- `CodeCount: Count Lines of Code`
16-
- `CodeCount: Count Lines of Code in All Files`
17-
- `CodeCount: Count Lines of Code by Extension`
18-
- `CodeCount: Refresh CodeCount Stats`
121+
- **Issues:** [GitHub Issues](https://github.com/KebanFiru/CodeCount/issues)
122+
- **Discussions:** [GitHub Discussions](https://github.com/KebanFiru/CodeCount/discussions)
19123

20-
## Requirements
124+
Please include:
125+
- Clear description of the issue/feature
126+
- Steps to reproduce (for bugs)
127+
- Expected vs actual behavior
128+
- VS Code version and OS
21129

22-
- VS Code 1.108.2 or newer.
130+
## 📊Project Statistics
23131

24-
## Usage
132+
- **Language:** TypeScript
133+
- **VS Code API:** 1.108.2+
134+
- **License:** MIT
135+
- **Status:** Active Development
25136

26-
1. Open the Command Palette.
27-
2. Run one of the CodeCount commands.
28-
3. Open the CodeCount view in the Activity Bar to see stats.
137+
## 💬 Questions?
29138

30-
## Contribution Guidelines
139+
Have questions? Feel free to:
140+
- Open a [Discussion](https://github.com/KebanFiru/CodeCount/discussions)
141+
- Check the [Issues](https://github.com/KebanFiru/CodeCount/issues) page
142+
- Create an Issue with the `question` label
31143

32-
Thanks for taking the time to contribute! To keep changes consistent, please follow these steps:
144+
---
33145

34-
1. Fork the repository and create a feature branch.
35-
2. Install dependencies with `npm install`.
36-
3. Build or watch the extension during development:
37-
- `npm run compile` for a one-time build
38-
- Press `F5` on [extension.ts](src/extension.ts) to launch the Extension Development Host.
39-
4. Run checks before opening a pull request:
40-
- `npm run lint`
41-
5. Open a pull request with a clear description of the change and any testing notes.
42146

43147

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22
"name": "codecount",
33
"displayName": "CodeCount",
44
"description": "A tool for learn how much line of code your project contains",
5-
"version": "0.0.1",
5+
"version": "1.0.0",
6+
"publisher": "KebanFiru",
7+
"license": "MIT",
8+
"homepage": "https://github.com/KebanFiru/CodeCount#readme",
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/KebanFiru/CodeCount.git"
12+
},
13+
"bugs": {
14+
"url": "https://github.com/KebanFiru/CodeCount/issues"
15+
},
616
"engines": {
717
"vscode": "^1.108.2"
818
},

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"sourceMap": true,
1010
"rootDir": "src",
1111
"strict": true, /* enable all strict type-checking options */
12+
"types": ["node"],
1213
/* Additional Checks */
1314
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
1415
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */

0 commit comments

Comments
 (0)