css

cssmin

A little node module that minimize CSS Files

Showing:

Popularity

Downloads/wk

144K

GitHub Stars

107

Maintenance

Last Commit

6yrs ago

Contributors

8

Package

Dependencies

0

Size (min+gzip)

1.3KB

License

Type Definitions

Tree-Shakeable

No?

Categories

Reviews

Average Rating

5.0/52
Read All Reviews
yadev64

Top Feedback

1Great Documentation
1Easy to Use
1Performant
1Highly Customizable
1Responsive Maintainers

Readme

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

Installation

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

npm -g i cssmin

Usage

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

var cssmin = require('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 :

var puts = require('util').puts,
fs = require('fs'),
cssmin = require('./cssmin');
var css = fs.readFileSync("/Any/Random/CSS/File.css", encoding='utf8');
var min = cssmin(css);
puts(min);

License

cssmin is released under a "BSD License":http://opensource.org/licenses/bsd-license.php.

Rate & Review

Great Documentation1
Easy to Use1
Performant1
Highly Customizable1
Bleeding Edge0
Responsive Maintainers1
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
Yadev JayachandranMannam, North Parur, Ernakulam Dist., Kerala, India.17 Ratings99 Reviews
Maker . Programmer . Designer
1 year ago

CSSmin is a good and simple node module for minimizing CSS files especially useful when it comes to production.


0

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial