uglifycss

WebJar for uglifycss

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

uglifycss
Последняя версия

Последняя версия

0.0.25
Дата

Дата

Тип

Тип

jar
Описание

Описание

uglifycss
WebJar for uglifycss
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/fmarcia/UglifyCSS

Скачать uglifycss

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/uglifycss/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>uglifycss</artifactId>
    <version>0.0.25</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/uglifycss/
implementation 'org.webjars.npm:uglifycss:0.0.25'
// https://jarcasting.com/artifacts/org.webjars.npm/uglifycss/
implementation ("org.webjars.npm:uglifycss:0.0.25")
'org.webjars.npm:uglifycss:jar:0.0.25'
<dependency org="org.webjars.npm" name="uglifycss" rev="0.0.25">
  <artifact name="uglifycss" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='uglifycss', version='0.0.25')
)
libraryDependencies += "org.webjars.npm" % "uglifycss" % "0.0.25"
[org.webjars.npm/uglifycss "0.0.25"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

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.) 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 converts relative urls using the d directory as location target
  • --debug prints full error stack on error
  • --output f puts the result in f 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.

Версии библиотеки

Версия
0.0.25
0.0.19
0.0.18