fix(config): Revert config file from TypeScript to JSON format

This change addresses issue #899 where running repomix against its own
repository fails when dependencies are not installed. The TypeScript
config file required runtime module resolution (including dependencies
like picocolors), which caused errors in fresh clones without npm install.

The JSON format:
- Requires no dependencies or module resolution
- Is more stable and universal
- Works immediately after git clone without npm install
- Maintains all the same configuration options

Closes #899
This commit is contained in:
Kazuki Yamada
2025-10-19 22:10:39 +09:00
parent d4c7d6ebb6
commit b0a2b1e2a7
2 changed files with 44 additions and 60 deletions

44
repomix.config.json Normal file
View File

@@ -0,0 +1,44 @@
{
"$schema": "https://repomix.com/schemas/latest/schema.json",
"input": {
"maxFileSize": 50000000
},
"output": {
"filePath": "repomix-output.xml",
"style": "xml",
"parsableStyle": false,
"compress": false,
"headerText": "This repository contains the source code for the Repomix tool.\nRepomix is designed to pack repository contents into a single file,\nmaking it easier for AI systems to analyze and process the codebase.\n\nKey Features:\n- Configurable ignore patterns\n- Custom header text support\n- Efficient file processing and packing\n\nPlease refer to the README.md file for more detailed information on usage and configuration.\n",
"instructionFilePath": "repomix-instruction.md",
"fileSummary": true,
"directoryStructure": true,
"files": true,
"removeComments": false,
"removeEmptyLines": false,
"topFilesLength": 5,
"showLineNumbers": false,
"includeEmptyDirectories": true,
"truncateBase64": true,
"tokenCountTree": 50000,
"git": {
"sortByChanges": true,
"sortByChangesMaxCommits": 100,
"includeDiffs": true,
"includeLogs": true,
"includeLogsCount": 50
}
},
"include": [],
"ignore": {
"useGitignore": true,
"useDefaultPatterns": true,
// ignore is specified in .repomixignore
"customPatterns": []
},
"security": {
"enableSecurityCheck": true
},
"tokenCount": {
"encoding": "o200k_base"
}
}

View File

@@ -1,60 +0,0 @@
// Note: Normally you would import from 'repomix', but since this is the repomix project itself,
// we import directly from the source index file.
// For your projects, use: import { defineConfig } from 'repomix';
import { defineConfig } from './src/index.js';
export default defineConfig({
input: {
maxFileSize: 50000000,
},
output: {
filePath: 'repomix-output.xml',
style: 'xml',
parsableStyle: false,
compress: false,
headerText: `This repository contains the source code for the Repomix tool.
Repomix is designed to pack repository contents into a single file,
making it easier for AI systems to analyze and process the codebase.
Key Features:
- Configurable ignore patterns
- Custom header text support
- Efficient file processing and packing
Please refer to the README.md file for more detailed information on usage and configuration.
`,
instructionFilePath: 'repomix-instruction.md',
fileSummary: true,
directoryStructure: true,
files: true,
removeComments: false,
removeEmptyLines: false,
topFilesLength: 5,
showLineNumbers: false,
includeEmptyDirectories: true,
truncateBase64: true,
// Display token count tree for files/directories with 50000+ tokens
// Can be boolean (true/false) or number (minimum token threshold)
tokenCountTree: 50000,
git: {
sortByChanges: true,
sortByChangesMaxCommits: 100,
includeDiffs: true,
includeLogs: true,
includeLogsCount: 50,
},
},
include: [],
ignore: {
useGitignore: true,
useDefaultPatterns: true,
// ignore is specified in .repomixignore
customPatterns: [],
},
security: {
enableSecurityCheck: true,
},
tokenCount: {
encoding: 'o200k_base',
},
});