RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Asset Sweeper Gem

Asset Sweeper This gem is for cleaning up rails application by removing unused images from application.

Install

ruby script/gem install asset_sweeper

You can find more details on : Asset Sweeper

Usage

Run rake task

rake asset_sweeper:sweep -t

This rake task scans for all images (in “public/images” folder) (.jpg, .png, .gif) in application (html, css, js files) and create a folder named unused in applications root directory and move images which are not used in application. But if image name is constructed dynamically in code this script will list such images.

Comments

Now this gem is extended for removing unused javascripts, stylesheets also. And it will also list missing images called from stylesheets in application

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in