New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cssmin

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssmin

A simple CSS minifier that uses a port of YUICompressor in JS

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
76K
decreased by-17.2%
Maintainers
1
Weekly downloads
 
Created
Source

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);

FAQs

Package last updated on 09 Nov 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc