Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A little node module that minimize CSS Files
JavaScript
tree: d6d6bc13e5

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README
cssmin.js

README

This is a node module that minimize CSS files (cssmin).

I used most rules for minimizing from Isaac Schlueter cssmin git
	http://github.com/isaacs/cssmin
	
And I also used YUICompressor source code for CSS minification.

------------------------------------------------------------------------------

The module export the cssmin function, you can use it with : 

	var cssmin = require('cssmin').cssmin;
	
The function take one argument :
	
	input -> the CSS content you want to minimize
	
	
Example :

var puts = require('sys').puts,
	fs = require('fs'),
	cssmin = require('./cssmin').cssmin;

var css = fs.readFileSync("/Any/Random/CSS/File.css", encoding='utf8');

var min = cssmin(css);

puts("BEFORE");
puts(css);

puts("AFTER");
puts(min);
	

Something went wrong with that request. Please try again.