fmarcia / Uglifycss
Licence: mit
Port of YUI CSS Compressor from Java to NodeJS
Stars: ✭ 259
Programming Languages
javascript
184084 projects - #8 most used programming language
Projects that are alternatives of or similar to Uglifycss
battlescribe-stylesheets
XSL Stylesheet to use for Kill Team rosters in Battlescribe
Stars: ✭ 26 (-89.96%)
Mutual labels: stylesheet
gatsby-plugin-optimize-svgs
A Gatsby Plugin to minify SVGs output to the filesystem during the build.
Stars: ✭ 39 (-84.94%)
Mutual labels: minify
postcss-clean
PostCss plugin to minify your CSS with clean-css
Stars: ✭ 41 (-84.17%)
Mutual labels: minify
packtag
A JSP Taglib for delivering minified, combined and gzip-compressed resources (JavaScript and CSS).
Stars: ✭ 22 (-91.51%)
Mutual labels: minify
booto
😍A light framework for React Application. Easy for life!
Stars: ✭ 18 (-93.05%)
Mutual labels: minify
imagemin-power-cli
Optimize (compress) images with power using imagemin 💪
Stars: ✭ 13 (-94.98%)
Mutual labels: minify
kirby-html-minifier
Minify the html output of a site built with Kirby CMS
Stars: ✭ 20 (-92.28%)
Mutual labels: minify
phaser-typescript-webpack
Another Phaser CE boilerplate using TypeScript and Webpack.
Stars: ✭ 17 (-93.44%)
Mutual labels: minify
OpenBook-E-Commerce
An e-commerce progressive web application, built with mern stack. It has features like product buy, order management by admin, payment gateway, cart, checkout and lot more.
Stars: ✭ 53 (-79.54%)
Mutual labels: minify
web-generator
👑 Gulp based task runner which creates HTML output from Pug HTML templates
Stars: ✭ 13 (-94.98%)
Mutual labels: minify
watch-any-movie
A Netflix Clone App built using React js , Material UI & OMDb API that allows searching of 1000+ movies and provides information about their plot, IMDB rating, MetaScore, Genre, and Year in which it is published, along with high-quality audio and video streaming.
Stars: ✭ 31 (-88.03%)
Mutual labels: minify
devonthink-markdown-css
📘 Github markdown style adjusted for DEVONthink updated automatically.
Stars: ✭ 46 (-82.24%)
Mutual labels: stylesheet
ResetCSS
Reset CSS Stylesheet to reduce browser inconsistencies.
Stars: ✭ 17 (-93.44%)
Mutual labels: stylesheet
csso-webpack-plugin
CSSO full restructuring minification files to serve your webpack bundles
Stars: ✭ 104 (-59.85%)
Mutual labels: minify
kirby-blade
Enable Laravel Blade Template Engine for Kirby 3
Stars: ✭ 20 (-92.28%)
Mutual labels: minify
DeveloperFolio
A DevFolio/Developer Portfolio built using ReactJs and Animation libraries.
Stars: ✭ 51 (-80.31%)
Mutual labels: minify
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.
Installation
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
Command line
$ uglifycss [options] [filename] [...] > output
Options:
-
--max-line-len n
adds a newline (approx.) everyn
characters;0
means no newline and is the default value -
--expand-vars
expands variables; by default,@variables
blocks are preserved andvar(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
converts relative urls using thed
directory as location target -
--debug
prints full error stack on error -
--output f
puts the result inf
file
If no file name is specified, input is read from stdin.
API
2 functions are provided:
-
processString( content, options )
to process a given string -
processFiles( [ filename1, ... ], options )
to process the concatenation of given files
Options 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
-
<string> convertUrls
for--convert-urls d
-
<bool> debug
for--debug
Both functions return uglified css.
Example
var uglifycss = require('uglifycss');
var uglified = uglifycss.processFiles(
[ 'file1', 'file2' ],
{ maxLineLen: 500, expandVars: true }
);
console.log(uglified);
License
UglifyCSS is MIT licensed.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].