|
| 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