Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Renaming the file so that it works with tetile

  • Loading branch information...
commit 10a9875cffb354d0d9e2500ae6072ab12694be78 1 parent f021238
jbleuzen authored
Showing with 30 additions and 0 deletions.
  1. +30 −0 README.textile
View
30 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);
Please sign in to comment.
Something went wrong with that request. Please try again.