New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cssmin-cli

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cssmin-cli

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

latest
Source
npmnpm
Version
0.0.5
Version published
Weekly downloads
21
23.53%
Maintainers
1
Weekly downloads
 
Created
Source

Description

It's a fork of jbleuzen/node-cssmin with ability to generate result in file from cli.

This is a nodejs 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.

FAQs

Package last updated on 12 Sep 2017

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