This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configuration | |
TARGET_FOLDER="${1:-./src/features/nutrition}" # Use first argument or default | |
OUTPUT_FILE="codebase-export.txt" | |
INCLUDE_EXTENSIONS=("ts" "tsx" "js" "jsx" "css" "html" "json" "md") | |
# Function to check if file should be included | |
should_include_file() { | |
local file="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configuration | |
OUTPUT_FILE="codebase_for_claude.txt" | |
EXTENSIONS=("*.js" "*.ts" "*.jsx" "*.tsx" "*.py" "*.java" "*.cpp" "*.h" "*.css" "*.html" "*.md" "*.json" "*.yml" "*.yaml") | |
EXCLUDE_DIRS=("node_modules" ".git" "dist" "build" "__pycache__" ".next" "coverage") | |
# Function to check if directory should be excluded | |
should_exclude_dir() { | |
local dir="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configuration | |
OUTPUT_FILE="codebase_for_claude.txt" | |
EXTENSIONS=("*.js" "*.ts" "*.jsx" "*.tsx" "*.py" "*.java" "*.cpp" "*.h" "*.css" "*.html" "*.md" "*.json" "*.yml" "*.yaml") | |
EXCLUDE_DIRS=("node_modules" ".git" "dist" "build" "__pycache__" ".next" "coverage") | |
# Clear the output file | |
> "$OUTPUT_FILE" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set correct permission: chmod +x tree.js | |
# call using ./tree.js | |
#!/usr/bin/env node | |
import fs from 'fs'; | |
import path from 'path'; | |
// Default folders to ignore | |
const DEFAULT_IGNORE = [ | |
'node_modules', |