# cssmin

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

Latest version **0.4.3** (published 2015-02-25) · 0 weekly downloads

## Install

```sh
npm install cssmin
pnpm add cssmin
yarn add cssmin
bun add cssmin
```

Provides the command `cssmin`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.3 |
| Published | 2015-02-25 |
| First published | 2011-04-13 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 111 |
| Author | Johan Bleuzen |
| Maintainers | jbleuzen |

## Links

- npm: https://www.npmjs.com/package/cssmin
- Repository: http://github.com/jbleuzen/node-cssmin
- Homepage: https://github.com/jbleuzen/node-cssmin
- Issues: https://github.com/jbleuzen/node-cssmin/issues
- npm.io page: https://npm.io/package/cssmin

## Recent versions

- 0.4.3 (latest) — 2015-02-25
- 0.4.2 — 2014-10-10
- 0.4.1 — 2013-05-11
- 0.4.0 — 2013-05-10
- 0.3.2 — 2012-10-14
- 0.3.1 — 2011-11-09
- 0.1.0 — 2011-04-13
- 0.2.0 — 2011-04-13
- 0.3.0 — 2011-04-13

## 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](https://github.com/yui/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.

---
_Source: https://npm.io/package/cssmin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
