Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(website): Add local development instructions for website to CONTRIBUTING.md #344

Merged
merged 3 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contribution Guide

Thanks for your interest in **Repomix**! 🚀 Wed love your help to make it even better. Heres how you can get involved:
Thanks for your interest in **Repomix**! 🚀 We'd love your help to make it even better. Here's how you can get involved:


- **Create an Issue**: Spot a bug? Have an idea for a new feature? Let us know by creating an issue.
Expand Down Expand Up @@ -77,6 +77,27 @@ npm run test-coverage

When adding new features or making changes, please update the relevant documentation in the README.md file.

### Website Development

The Repomix website is built with [VitePress](https://vitepress.dev/). To run the website locally:

```bash
# Prerequisites: Docker must be installed on your system

# Start the website development server
npm run website

# Access the website at http://localhost:5173/
```

The website source code is located in the `website` directory. The main components are:

- `website/client`: Frontend code (Vue.js components, styles, etc.)
- `website/server`: Backend API server

When updating documentation, you only need to update the English version (`website/client/src/en/`).
The maintainers will handle translations to other languages.

## Releasing

New versions are managed by the maintainer. If you think a release is needed, open an issue to discuss it
Expand Down
39 changes: 28 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,30 +407,47 @@ This format provides a clean, readable structure that is both human-friendly and

### Command Line Options

#### Basic Options
- `-v, --version`: Show tool version

#### Output Options
- `-o, --output <file>`: Specify the output file name
- `--include <patterns>`: List of include patterns (comma-separated)
- `-i, --ignore <patterns>`: Additional ignore patterns (comma-separated)
- `--no-gitignore`: Disable .gitignore file usage
- `--no-default-patterns`: Disable default patterns
- `-c, --config <path>`: Path to a custom config file
- `--header-text <text>`: Custom text to include in the file header
- `--style <style>`: Specify the output style (`plain`, `xml`, `markdown`)
- `--parsable-style`: Enable parsable output based on the chosen style schema. Note that this can increase token count.
- `--output-show-line-numbers`: Show line numbers in the output
- `--copy`: Additionally copy generated output to system clipboard
- `--no-file-summary`: Disable file summary section output
- `--no-directory-structure`: Disable directory structure section output
- `--remove-comments`: Remove comments from supported file types
- `--remove-empty-lines`: Remove empty lines from the output
- `--top-files-len <number>`: Number of top files to display in the summary
- `--output-show-line-numbers`: Show line numbers in the output
- `--copy`: Additionally copy generated output to system clipboard
- `--header-text <text>`: Custom text to include in the file header
- `--instruction-file-path <path>`: Path to a file containing detailed custom instructions
- `--include-empty-directories`: Include empty directories in the output

#### Filter Options
- `--include <patterns>`: List of include patterns (comma-separated)
- `-i, --ignore <patterns>`: Additional ignore patterns (comma-separated)
- `--no-gitignore`: Disable .gitignore file usage
- `--no-default-patterns`: Disable default patterns

#### Remote Repository Options
- `--remote <url>`: Process a remote Git repository
- `--remote-branch <name>`: Specify the remote branch name, tag, or commit hash (defaults to repository default branch)

#### Configuration Options
- `-c, --config <path>`: Path to a custom config file
- `--init`: Create config file
- `--global`: Use global config

#### Security Options
- `--no-security-check`: Disable security check

#### Token Count Options
- `--token-count-encoding <encoding>`: Specify token count encoding (e.g., `o200k_base`, `cl100k_base`)

#### Other Options
- `--top-files-len <number>`: Number of top files to display in the summary
- `--verbose`: Enable verbose logging
- `--instruction-file-path <path>`: Path to a file containing detailed custom instructions
- `--include-empty-directories`: Include empty directories in the output

Examples:

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"repomix": "npm run build && node --trace-warnings bin/repomix.cjs",
"repomix-src": "npm run repomix -- --include 'src,tests'",
"repomix-website": "npm run repomix -- --include 'website'",
"website": "docker compose -f website/compose.yml up --build",
"npm-publish": "npm run lint && npm run test-coverage && npm run build && npm publish",
"npm-release-patch": "npm version patch && npm run npm-publish",
"npm-release-minor": "npm version minor && npm run npm-publish",
Expand Down
33 changes: 33 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Repomix Website

This directory contains the source code for the Repomix website, built with [VitePress](https://vitepress.dev/) and [Vue.js](https://vuejs.org/)

## Prerequisites

- Docker must be installed on your system

## Development

To start the development server:

```bash
# Start the website development server
npm run website

# Access the website at http://localhost:5173/
```

## Documentation

When updating documentation, you only need to update the English version (`client/src/en/`).
The maintainers will handle translations to other languages.

## Building for Production

To build the website for production:

```bash
npm run website:build
```

The built files will be available in the `client/dist` directory.
2 changes: 2 additions & 0 deletions website/client/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig } from 'vitepress';
import { configDe } from './config/configDe';
import { configEnUs } from './config/configEnUs';
import { configEs } from './config/configEs';
import { configJa } from './config/configJa';
Expand All @@ -16,5 +17,6 @@ export default defineConfig({
es: { label: 'Español', ...configEs },
'pt-br': { label: 'Português', ...configPtBr },
ko: { label: '한국어', ...configKo },
de: { label: 'Deutsch', ...configDe },
},
});
66 changes: 66 additions & 0 deletions website/client/.vitepress/config/configDe.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { type DefaultTheme, defineConfig } from 'vitepress';

export const configDe = defineConfig({
lang: 'de',
description: 'Verpacken Sie Ihren Code in AI-freundliche Formate',
themeConfig: {
nav: [
// guide
{ text: 'Anleitung', link: '/de/guide/' },
{ text: 'Discord beitreten', link: 'https://discord.gg/wNYzTwZFku' },
],
sidebar: {
'/de/guide/': [
{
text: 'Anleitung',
items: [
{ text: 'Erste Schritte', link: '/de/guide/' },
{ text: 'Installation', link: '/de/guide/installation' },
{ text: 'Verwendung', link: '/de/guide/usage' },
{ text: 'Prompt-Beispiele', link: '/de/guide/prompt-examples' },
{ text: 'Ausgabeformate', link: '/de/guide/output' },
{ text: 'Befehlszeilenoptionen', link: '/de/guide/command-line-options' },
{ text: 'Remote-Repository-Verarbeitung', link: '/de/guide/remote-repository-processing' },
{ text: 'Konfiguration', link: '/de/guide/configuration' },
{ text: 'Benutzerdefinierte Anweisungen', link: '/de/guide/custom-instructions' },
{ text: 'Kommentarentfernung', link: '/de/guide/comment-removal' },
{ text: 'Sicherheit', link: '/de/guide/security' },
{
text: 'Tipps & Tricks',
items: [{ text: 'Best Practices', link: '/de/guide/tips/best-practices' }],
},
{
text: 'Entwicklung',
items: [
{ text: 'Beitragen', link: '/de/guide/development/' },
{ text: 'Einrichtung', link: '/de/guide/development/setup' },
],
},
],
},
],
},
},
});

export const configDeSearch: DefaultTheme.LocalSearchOptions['locales'] = {
de: {
translations: {
button: {
buttonText: 'Suchen',
buttonAriaLabel: 'Suchen',
},
modal: {
displayDetails: 'Detaillierte Liste anzeigen',
resetButtonTitle: 'Suche zurücksetzen',
backButtonTitle: 'Schließen',
noResultsText: 'Keine Ergebnisse für',
footer: {
selectText: 'zum Auswählen',
navigateText: 'zur Navigation',
closeText: 'zum Schließen',
},
},
},
},
};
1 change: 1 addition & 0 deletions website/client/.vitepress/config/configJa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const configJa = defineConfig({
description: 'コードベースをAIフレンドリーな形式にパッケージング',
themeConfig: {
nav: [
// guide
{ text: '使い方', link: '/ja/guide/' },
{ text: 'Discordに参加', link: 'https://discord.gg/wNYzTwZFku' },
],
Expand Down
6 changes: 4 additions & 2 deletions website/client/.vitepress/config/configShard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { visualizer } from 'rollup-plugin-visualizer';
import { type ManifestOptions, VitePWA } from 'vite-plugin-pwa';
import { defineConfig } from 'vitepress';
import { configDeSearch } from './configDe';
import { configEsSearch } from './configEs';
import { configJaSearch } from './configJa';
import { configKoSearch } from './configKo';
Expand Down Expand Up @@ -62,11 +63,12 @@ export const configShard = defineConfig({
provider: 'local',
options: {
locales: {
...configDeSearch,
...configEsSearch,
...configJaSearch,
...configZhCnSearch,
...configKoSearch,
...configPtBrSearch,
...configEsSearch,
...configZhCnSearch,
},
},
},
Expand Down
65 changes: 65 additions & 0 deletions website/client/src/de/guide/command-line-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Befehlszeilenoptionen

## Grundlegende Optionen
- `-v, --version`: Zeigt die Version des Tools an

## Ausgabeoptionen
- `-o, --output <file>`: Name der Ausgabedatei (Standard: `repomix-output.txt`)
- `--style <type>`: Ausgabestil (`plain`, `xml`, `markdown`) (Standard: `plain`)
- `--parsable-style`: Aktiviert analysierbare Ausgabe basierend auf dem gewählten Stilschema (Standard: `false`)
- `--output-show-line-numbers`: Zeilennummern hinzufügen (Standard: `false`)
- `--copy`: In die Zwischenablage kopieren (Standard: `false`)
- `--no-file-summary`: Dateizusammenfassung deaktivieren (Standard: `true`)
- `--no-directory-structure`: Verzeichnisstruktur deaktivieren (Standard: `true`)
- `--remove-comments`: Kommentare entfernen (Standard: `false`)
- `--remove-empty-lines`: Leere Zeilen entfernen (Standard: `false`)
- `--header-text <text>`: Benutzerdefinierten Text im Dateikopf einfügen
- `--instruction-file-path <path>`: Pfad zu einer Datei mit detaillierten benutzerdefinierten Anweisungen
- `--include-empty-directories`: Leere Verzeichnisse in die Ausgabe einschließen (Standard: `false`)

## Filteroptionen
- `--include <patterns>`: Einschlussmuster (durch Kommas getrennt)
- `-i, --ignore <patterns>`: Ignorierungsmuster (durch Kommas getrennt)
- `--no-gitignore`: .gitignore-Dateiverwendung deaktivieren
- `--no-default-patterns`: Standardmuster deaktivieren

## Remote-Repository-Optionen
- `--remote <url>`: Remote-Repository verarbeiten
- `--remote-branch <n>`: Remote-Branch-Namen, Tag oder Commit-Hash angeben (Standard: Repository-Standardbranch)

## Konfigurationsoptionen
- `-c, --config <path>`: Pfad zur benutzerdefinierten Konfigurationsdatei
- `--init`: Konfigurationsdatei erstellen
- `--global`: Globale Konfiguration verwenden

## Sicherheitsoptionen
- `--no-security-check`: Sicherheitsprüfung deaktivieren (Standard: `true`)

## Token-Zählungsoptionen
- `--token-count-encoding <encoding>`: Token-Zählungskodierung angeben (z.B. `o200k_base`, `cl100k_base`) (Standard: `o200k_base`)

## Weitere Optionen
- `--top-files-len <number>`: Anzahl der anzuzeigenden Top-Dateien (Standard: `5`)
- `--verbose`: Ausführliche Protokollierung aktivieren

## Beispiele

```bash
# Grundlegende Verwendung
repomix

# Benutzerdefinierte Ausgabe
repomix -o output.xml --style xml

# Bestimmte Dateien verarbeiten
repomix --include "src/**/*.ts" --ignore "**/*.test.ts"

# Remote-Repository mit Branch
repomix --remote https://github.com/user/repo/tree/main

# Remote-Repository mit Commit
repomix --remote https://github.com/user/repo/commit/836abcd7335137228ad77feb28655d85712680f1

# Remote-Repository mit Kurzform
repomix --remote user/repo
```
53 changes: 53 additions & 0 deletions website/client/src/de/guide/comment-removal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Kommentarentfernung

Repomix kann beim Generieren der Ausgabedatei automatisch Kommentare aus Ihrer Codebasis entfernen. Dies kann helfen, Störungen zu reduzieren und sich auf den eigentlichen Code zu konzentrieren.

## Verwendung

Um die Kommentarentfernung zu aktivieren, setzen Sie die Option `removeComments` in Ihrer `repomix.config.json` auf `true`:

```json
{
"output": {
"removeComments": true
}
}
```

## Unterstützte Sprachen

Repomix unterstützt die Kommentarentfernung für eine Vielzahl von Programmiersprachen, einschließlich:

- JavaScript/TypeScript (`//`, `/* */`)
- Python (`#`, `"""`, `'''`)
- Java (`//`, `/* */`)
- C/C++ (`//`, `/* */`)
- HTML (`<!-- -->`)
- CSS (`/* */`)
- Und viele mehr...

## Beispiel

Gegeben sei der folgende JavaScript-Code:

```javascript
// Dies ist ein einzeiliger Kommentar
function test() {
/* Dies ist ein
mehrzeiliger Kommentar */
return true;
}
```

Mit aktivierter Kommentarentfernung wird die Ausgabe wie folgt aussehen:

```javascript
function test() {
return true;
}
```

## Hinweise

- Die Kommentarentfernung wird vor anderen Verarbeitungsschritten durchgeführt, wie z.B. der Zeilennummerierung.
- Einige Kommentare, wie JSDoc-Kommentare, können je nach Sprache und Kontext erhalten bleiben.
Loading
Loading