qwrk-laconic-core/scripts/folderize-components.sh
Ian Cameron Lyles 9f9870113c
chore(ui): LAC-126 components migrated (#4)
* chore: Onboarding components migrated

* chore: wrap pages

* chore(components): Migrate core and navigation components

Migrated core and navigation components from Snowballtools repository:
- Core components: Dropdown, FormatMilliSecond, Logo, SearchBar, Stepper, StopWatch, VerticalStepper
- Navigation components: GitHubSessionButton, LaconicIcon, NavigationActions, WalletSessionId

Follows component migration guidelines with:
- Tailwind styling
- Consistent file structure
- TypeScript type definitions
- README documentation

* chore(routing): Basic routing within navigation

* chore: Import project cards and deps
2025-03-20 08:17:54 -07:00

33 lines
891 B
Bash
Executable File

#!/bin/bash
cd /Users/ianlylesblx/IDEA_CORE/laconic/repos/qwrk-laconic-core/services/ui/src/components
for file in $(find . -maxdepth 1 -type f \( -name "*.tsx" -o -name "*.ts" \) -not -name "index.ts"); do
# Extract just the filename without path
base_file=$(basename "$file")
# Get filename without extension
base_name="${base_file%.*}"
# Get file extension
extension="${base_file##*.}"
# Skip if already a directory
if [ -d "$base_name" ]; then
echo "Directory $base_name already exists, skipping"
continue
fi
# Create directory
mkdir -p "$base_name"
# Create index.ts
echo "export * from './$base_file';" > "$base_name/index.ts"
# Move file
mv "$base_file" "$base_name/"
echo "Processed $base_file -> $base_name/$base_file"
done
echo "Component restructuring complete!"