combicode 1.7.3 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +24 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -288,6 +288,30 @@ async function main() {
288
288
  rootIgnoreManager.add(argv.exclude.split(","));
289
289
  }
290
290
 
291
+ const gitModulesPath = path.join(projectRoot, ".gitmodules");
292
+ if (fs.existsSync(gitModulesPath)) {
293
+ try {
294
+ const content = fs.readFileSync(gitModulesPath, "utf8");
295
+ const lines = content.split(/\r?\n/);
296
+ const submodulePaths = [];
297
+
298
+ for (const line of lines) {
299
+ // Match lines like: path = libs/my-lib
300
+ const match = line.match(/^\s*path\s*=\s*(.+?)\s*$/);
301
+ if (match) {
302
+ submodulePaths.push(match[1]);
303
+ }
304
+ }
305
+
306
+ if (submodulePaths.length > 0) {
307
+ // Add identified submodule paths to the ignore manager
308
+ rootIgnoreManager.add(submodulePaths);
309
+ }
310
+ } catch {
311
+ // Fail silently if .gitmodules cannot be read
312
+ }
313
+ }
314
+
291
315
  // Create skip-content manager
292
316
  const skipContentManager = ignore();
293
317
  if (argv.skipContent) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "combicode",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "A CLI tool to combine a project's codebase into a single file for LLM context.",
5
5
  "main": "index.js",
6
6
  "bin": {