Skip to content

Add automatic icon management system#60

Open
azimcan wants to merge 1 commit intolab2023:developfrom
azimcan:claude/manage-asset-icons-011CULCxGnMxWoJaezHn5RgW
Open

Add automatic icon management system#60
azimcan wants to merge 1 commit intolab2023:developfrom
azimcan:claude/manage-asset-icons-011CULCxGnMxWoJaezHn5RgW

Conversation

@azimcan
Copy link
Member

@azimcan azimcan commented Oct 21, 2025

This feature automatically manages which icons are included in the host application's assets, keeping only used icons and removing unused ones.

Key Changes:

  • Added IconScanner service to scan Rails apps for icon_tag usage
  • Added IconSyncer service to copy used icons and remove unused ones
  • Created rake tasks: heroicons:sync, heroicons:dry_run, heroicons:list_used
  • Updated Engine to load rake tasks and support auto_sync configuration
  • Added comprehensive tests for new functionality
  • Updated documentation (README.md and CLAUDE.md)

How it works:

  1. IconScanner searches views, helpers, components for icon_tag calls
  2. IconSyncer copies only used icons to app/assets/images/icons/
  3. Unused icons are automatically removed
  4. Optional auto-sync before asset precompilation

Benefits:

  • Smaller asset bundles (only includes used icons)
  • Automatic cleanup of unused icons
  • Easy auditing of icon usage
  • Version control friendly

🤖 Generated with Claude Code

This feature automatically manages which icons are included in the host application's assets, keeping only used icons and removing unused ones.

Key Changes:
- Added IconScanner service to scan Rails apps for icon_tag usage
- Added IconSyncer service to copy used icons and remove unused ones
- Created rake tasks: heroicons:sync, heroicons:dry_run, heroicons:list_used
- Updated Engine to load rake tasks and support auto_sync configuration
- Added comprehensive tests for new functionality
- Updated documentation (README.md and CLAUDE.md)

How it works:
1. IconScanner searches views, helpers, components for icon_tag calls
2. IconSyncer copies only used icons to app/assets/images/icons/
3. Unused icons are automatically removed
4. Optional auto-sync before asset precompilation

Benefits:
- Smaller asset bundles (only includes used icons)
- Automatic cleanup of unused icons
- Easy auditing of icon usage
- Version control friendly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants