Skip to content

Commit

Permalink
Renaming the file so that it works with tetile
Browse files Browse the repository at this point in the history
  • Loading branch information
jbleuzen committed Apr 13, 2011
1 parent f021238 commit 10a9875
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.textile
@@ -0,0 +1,30 @@
h2. Description

This is a node.js module that minimize CSS files (cssmin).
It uses a port of YUICompressor made in JavaScript by Stoyan Stefanov based on Isaac Schlueter work.
For more informations about YUICompressor -> https://github.com/yui/yuicompressor

h2. Installation

You can either download the plugin and unzip it into to your project folder or you can use npm to install the node-cssmin package.

h2. Usage

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

pre. var cssmin = require('cssmin').cssmin;

The function cssmin takes two arguments :
* input : the CSS content you want to minimize.
* linebreakpos : the number of characters before the end of the line. If empty, the output will have only one line.

Example :

pre.. 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(min);

0 comments on commit 10a9875

Please sign in to comment.