![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
uglifycss
Advanced tools
Readme
UglifyCSS is a port of YUI Compressor to NodeJS for its CSS part. Its name is a reference to the awesome UglifyJS but UglifyCSS is not a CSS parser. Like YUI CSS Compressor, it applies many regexp replacements. Note that a port to JavaScript is also available in the YUI Compressor repository.
UglifyCSS passes successfully the test suite of YUI compressor CSS.
Be sure to submit valid CSS to UglifyCSS or you could get weird results.
For a command line usage:
$ npm install uglifycss -g
For API usage:
$ npm install uglifycss
From Github:
$ git clone git://github.com/fmarcia/UglifyCSS.git
$ uglifycss [options] [filename] [...] > output
Options:
--max-line-len n
adds a newline (approx.) every n
characters; 0
means no newline and is the default value--expand-vars
expands variables; by default, @variables
blocks are preserved and var(x)
s are not expanded--ugly-comments
removes newlines within preserved comments; by default, newlines are preserved--cute-comments
preserves newlines within and around preserved comments--convert-urls d
convert relative urls according to the d
directoryIf no file name is specified, input is read from stdin.
2 functions are provided:
processString( content, options )
to process a given stringprocessFiles( [ filename1, ... ], options )
to process the concatenation of given filesOptions are identical to the command line:
<int> maxLineLen
for --max-line-len n
<bool> expandVars
for --expand-vars
<bool> uglyComments
for --ugly-comments
<bool> cuteComments
for --cute-comments
Both functions return uglified css.
var uglifycss = require('uglifycss');
var uglified = uglifycss.processFiles(
[ 'file1', 'file2' ],
{ maxLineLen: 500, expandVars: true }
);
console.log(uglified);
UglifyCSS is MIT licensed.
FAQs
Port of YUI CSS Compressor to NodeJS
The npm package uglifycss receives a total of 53,522 weekly downloads. As such, uglifycss popularity was classified as popular.
We found that uglifycss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.