1.1.1 • Published 6 months ago

cleanup-unused-images v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Cleanup Unused Images

A tool to find and delete unused image files in your project.

🚀 Installation

npm install -g cleanup-unused-images

📖 Usage

1. Direct Usage

# Check unused images (without deletion)
cleanup-images

# Check and delete unused images
cleanup-images -d

# Specify project directory
cleanup-images -p /path/to/project

2. Integration with package.json

{
  "scripts": {
    "cleanup": "cleanup-images",
    "cleanup:delete": "cleanup-images -d"
  }
}

3. Run script from package.json by npm or yarn

npm run cleanup
npm run cleanup:delete

⚙️ Options

OptionDescriptionDefault
-d, --deleteDelete unused image filesfalse
-p, --directoryPath to project directoryCurrent directory

🖥️ Display Results

// Results will be displayed in English
{
    "Images tested": "100",
    "Unused images": "15",
    "Directory tested": "/project/path",
    "Processing status": "Completed"
}

⚠️ Important Notes

  • Backup your project before running
  • Test without -d flag first
  • Carefully review the list of images to be deleted
  • Tool will search in files:
    • .tsx, .jsx, .js, .ts
    • .css, .scss
    • .html, .md

🔍 Supported Image Formats

  • .png
  • .jpg, .jpeg
  • .gif
  • .webp
  • .svg
  • .ico

📋 System Requirements

  • Node.js 14.x or higher
  • npm or yarn

🐛 Troubleshooting

If you encounter issues:

  1. Check directory permissions
  2. Ensure public directory exists
  3. Verify supported image formats
  4. Run without -d flag for debugging

🤝 Contributing

All contributions are welcome! Please create an issue or pull request.

📄 License

MIT

📞 Support

If you need help:

  • Create an issue on GitHub
  • Check existing issues
  • Read the documentation carefully

💖 Donate

If you find this tool helpful, you can support the development by donating:


Made with ❤️ to keep your projects cleaner

1.1.1

6 months ago

1.1.0

7 months ago

1.0.5

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago