sprockets
https://github.com/rails/sprockets
Ruby
Rack-based asset packaging system
Sprockets::Manifest#clean
Cleanup old assets in the compile directory. By default it will keep the latest version, 2 backups and any created within the past hour. Examples To force only 1 backup to be kept, set count=1 and age=0. To only keep files created within the last 10 minutes, set count=0 and age=600.
Edit
git clone [email protected]:rails/sprockets.git
cd sprockets
open lib/sprockets/manifest.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Sprockets--Manifest-clean-for-pr
# Commit to gitgit add lib/sprockets/manifest.rbgit commit -m "better docs for Sprockets::Manifest#clean"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Sprockets--Manifest-clean-for-pr
hub pull-request
# Celebrate!