From 93dee7343d460dbf9e33c85f4b5692dc77ff5bc1 Mon Sep 17 00:00:00 2001 From: "B.T. Franklin" Date: Sat, 29 Jun 2024 23:11:58 -0700 Subject: [PATCH] Added -lock.json to specific exclusions, and updated README to match --- README.md | 2 +- src/coderoller/source_repo_flattener.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 16c329f..6a02bd9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Coderoller is a Python utility that flattens a source code repository into a sin - **Flattens source code repositories** into a single markdown file. - **Supports multiple file types** including `.py`, `.js`, `.jsx`, `.ts`, `.tsx`, `.swift`, `.go`, `.java`, `.c`, `.cpp`, `.h`, `.hpp`, `.cs`, `.lua`, `.rb`, `.php`, `.pl`, `.html`, `.css`, `.json`, `.toml`, `.md`, `.yaml`, `.yml`, `.conf`, `.ini`, and `.sh`. - **Automatically includes README** files if present, placing it at the start of the flattened file. -- **Excludes hidden files and directories** (those starting with a dot), specific directories (`build`, `dist`, `node_modules`, `__pycache__`), specific files (`*.flat.md`, `*.lock`, `*.hidden`), and any paths specified in `.gitignore`. +- **Excludes hidden files and directories** (those starting with a dot), specific directories (`build`, `dist`, `node_modules`, `__pycache__`), specific files (lockfiles, hidden files, other flattened files, etc.), and any paths specified in `.gitignore`. - **Supports flattening directly from Git URLs** even if the repository is not cloned locally. ## Installation diff --git a/src/coderoller/source_repo_flattener.py b/src/coderoller/source_repo_flattener.py index c14cf82..44a2238 100644 --- a/src/coderoller/source_repo_flattener.py +++ b/src/coderoller/source_repo_flattener.py @@ -70,6 +70,7 @@ def should_include_path(file_path: str, spec: pathspec.PathSpec) -> bool: "__pycache__", ".flat.md", ".lock", + "-lock.json", ".hidden", ]