Skip to content

mikedamage/css-combiner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Ruby CSS Combiner

Copyright © 2008, Mike Green <mike.is.green@gmail.com>

Summary

This script simply concatenates CSS or Javascript files, strips out comments and whitespace, and sends them back to the page that requested them. It’s meant to be embedded in an (X)HTML document just like a Javascript of CSS file.

NOTE: For debugging purposes, I’ve required Rubygems and the CGI-Exception gem in the script. These are totally optional and should be commented out for production use because they’ll slow you down quite a bit. It’s just a convenient way to check CGI errors without delving into Apache log files.

Usage/Examples

I don’t really have time to figure out the peculiarities of Github’s Textile and RDoc rendering, so I’m just going to give a couple very basic examples. Here’s how to use the script in an HTTP request:

css-combiner.rb?format=css&files=/absolute/path/to/file1.css&files=/absolute/path/to/file2.css

About

Ruby CGI script that strips and concatenates CSS or Javascript files to cut down on HTTP requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages