Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add most used functions of cssmin for use as a node.js module #24

wants to merge 1 commit into from

2 participants


This is a simple wrapper to achieve one goal: a node module that is forward compatible with future releases of YUICompressor.

This module exposes the entire compressor object as well as the most commonly used cssmin function.


Thanks for your contribution, but the cssmin.js code has been forked into - we will almost certainly be dropping support for it from YUICompressor very soon. This submission should probably move over to the ycssmin project.

@tml tml closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 0 deletions.
  1. +11 −0 ports/js/cssmin.node.js
11 ports/js/cssmin.node.js
@@ -0,0 +1,11 @@
+ * node.js
+ * Author: Corin Lawson -
+ * This is a wrapper of cssmin.js, suitable for use in Node.js.
+ * Permission is hereby granted to do what you you see fit.
+ */
+(function() {
+ eval(String(require('fs').readFileSync(__dirname + '/cssmin.js')));
+ exports.compressor = YAHOO.compressor;
+ exports.cssmin = function () { return YAHOO.compressor.cssmin.apply(YAHOO.compressor, arguments); };
Something went wrong with that request. Please try again.