Compressit

Compressit provides a simple way to compress your project .css and .js files to not only reduce their size, but also reduce web requests improving the overall performance of your site.

Features

  • Command Line Input (CLI)

  • Reduce filesize of all css/js files

  • Reduces number of necissary requests to servers for assets

  • Support for single or multiple file compression

Install

Rails (discontinued support)

NOTE: This will still work with Rails, however I have discontinued a specific rails ‘integration’ due to a very similar feature being added with the release of Rails 3.1

Add this line to your Gemfile:

gem 'compressit'

Then do a bundle install:

bundle install


Non Rails

gem install compressit

Usage

Usage: compressit -command [FILE/DIR]

  -h, --help 							Display this help
  -v, --version 						Display current gem version
  -f, --file FILE 					Compress FILE in place
  -F, --files DIR 					Compress files from DIR into DIR/compressed

TODO

  • May add a better versioning system

  • Initially had the ability to specify a destination folder, may add this back if requested

  • Tests

  • [X]One final pass of cleanup and refactoring

  • Implement the ability to skip files in the compression process

  • It would be awesome if it could replace all your current css/js calls with itself so you didn’t have to (we’ll see about this)

Copyright © 2011 Steve Domino. See LICENSE.txt for further details