Skip to content

Commit be7e348

Browse files
committed
docs: add contributing guide and improve build process
1 parent cce9965 commit be7e348

9 files changed

Lines changed: 195 additions & 1023 deletions

File tree

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

.vscodeignore

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,21 @@ test/**
55
*.test.js
66
*.test.ts
77

8-
# Development files
9-
node_modules/**
8+
# Development files (but keep node_modules dependencies)
109
.git/**
1110
.vscode/**
1211
.vscode-test/**
1312
scripts/**
1413
!scripts/*.md
1514

16-
# Build outputs (keep only necessary)
17-
# Exclude all out/ except specific files
15+
# Exclude most of node_modules but keep strip-ansi
16+
node_modules/*
17+
!node_modules/strip-ansi
18+
!node_modules/strip-ansi/**/*
19+
!node_modules/ansi-regex
20+
!node_modules/ansi-regex/**/*
21+
22+
# Build outputs - include all out files
1823
out/**
1924
!out/extension.js
2025
!out/extension.js.map
@@ -26,8 +31,14 @@ out/**
2631
!out/privacyCommands.js.map
2732
!out/terminalHistoryProvider.js
2833
!out/terminalHistoryProvider.js.map
34+
!out/constants/**/*.js
35+
!out/constants/**/*.js.map
36+
!out/enums/**/*.js
37+
!out/enums/**/*.js.map
38+
!out/interfaces/**/*.js
39+
!out/interfaces/**/*.js.map
2940

30-
# Documentation (keep README and LICENSE)
41+
# Documentation
3142
!README.md
3243
!LICENSE.md
3344
CHANGELOG.md
@@ -43,4 +54,3 @@ docs/**
4354
# Binary files
4455
bin/
4556
*.vsix
46-
node_modules/

CONTRIBUTING.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# Contributing to Terminal History Outline
2+
3+
Thank you for your interest in contributing! This guide will help you get started.
4+
5+
## Prerequisites
6+
7+
- Node.js 18+
8+
- npm
9+
- VS Code
10+
11+
## Development Setup
12+
13+
### 1. Clone the repository
14+
15+
git clone https://github.com/chamren86/terminal-history-outline.git
16+
cd terminal-history-outline
17+
18+
### 2. Install dependencies
19+
20+
npm install
21+
22+
### 3. Build the extension
23+
24+
npm run compile
25+
26+
### 4. Test the extension
27+
28+
# Run all tests
29+
npm test
30+
31+
# Run quick tests
32+
npm run test:unit
33+
34+
# Run pre-commit checks
35+
npm run precommit
36+
37+
### 5. Package the extension
38+
39+
# Package the VSIX
40+
npm run package
41+
42+
# Or manually
43+
vsce package
44+
45+
### 6. Install locally
46+
47+
# Install the VSIX
48+
code --install-extension terminal-history-outline-*.vsix --force
49+
50+
## Project Structure
51+
52+
src/
53+
├── constants/ # Constants and configuration
54+
├── enums/ # TypeScript enums
55+
├── interfaces/ # TypeScript interfaces
56+
├── test/ # Unit tests
57+
├── cleaner.ts # ANSI cleaning
58+
├── extension.ts # Extension activation
59+
├── privacyCommands.ts # Privacy dashboard
60+
├── security.ts # Security module
61+
└── terminalHistoryProvider.ts # Tree provider
62+
63+
## Common Issues
64+
65+
### "Cannot find package 'strip-ansi'"
66+
67+
Make sure you've run npm install and that strip-ansi is in dependencies in package.json.
68+
69+
### "No data provider registered"
70+
71+
This usually means the constants folder wasn't included. Run npm run compile then vsce package to rebuild.
72+
73+
### Tests failing
74+
75+
Make sure you're using the correct Node.js version (18+) and have installed all dependencies.
76+
77+
## Making Changes
78+
79+
1. Create a feature branch: git checkout -b feature/your-feature
80+
2. Make your changes
81+
3. Run tests: npm test
82+
4. Run pre-commit checks: npm run precommit
83+
5. Commit: git commit -m "Description of changes"
84+
6. Push: git push origin feature/your-feature
85+
7. Create a Pull Request
86+
87+
## Release Process
88+
89+
1. Update version in package.json
90+
2. Update CHANGELOG.md
91+
3. Build: npm run compile
92+
4. Package: vsce package
93+
5. Create tag: git tag -a vX.X.X -m "Release vX.X.X"
94+
6. Create release: gh release create vX.X.X --title "vX.X.X" --notes-file RELEASE-NOTES.md terminal-history-outline-X.X.X.vsix
95+
96+
## License
97+
98+
MIT

0 commit comments

Comments
 (0)