Commit 3601809
fix: refactor install script into modular architecture for maintainability
Refactor monolithic 706-line install.sh into well-organized modules following software engineering best practices:
Modular Architecture (scripts/lib/):
- ui.sh (36 lines) - Color codes and print functions
- utils.sh (49 lines) - Common utilities and jq installation
- download.sh (48 lines) - GitHub API and file download functions
- files.sh (109 lines) - Claude CodePro file management
- dependencies.sh (191 lines) - All dependency installations (NVM, Node.js, Python, etc.)
- shell.sh (100 lines) - Shell configuration and alias management
Main install.sh (343 lines):
- Bootstrap functionality to download lib modules for curl | bash support
- Configuration constants
- Source all modules
- Main installation orchestration
Benefits:
- 51% reduction in main script size (706 → 343 lines)
- Single Responsibility Principle - each module has clear purpose
- DRY principle applied throughout
- Improved maintainability and testability
- Better code organization and readability
- Flexible NVM detection for dev containers and local environments
- All syntax checks pass
No Breaking Changes:
- Maintains curl | bash installation method
- All existing functionality preserved
- Same user experience
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 679f619 commit 3601809
File tree
8 files changed
+621
-414
lines changed- scripts
- lib
8 files changed
+621
-414
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments