Comparing version 1.3.12 to 1.4.0
{ | ||
"name": "csso", | ||
"description": "CSSO — CSS optimizer", | ||
"version": "1.3.12", | ||
"version": "1.4.0", | ||
"homepage": "https://github.com/css/csso", | ||
"author": "Sergey Kryzhanovsky <skryzhanovsky@ya.ru> (https://github.com/afelix)", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/css/csso.git" | ||
}, | ||
"repository": "css/csso", | ||
"bugs": { | ||
@@ -18,12 +15,28 @@ "url": "https://github.com/css/csso/issues" | ||
}, | ||
"main": "./lib/cssoapi", | ||
"main": "./lib/index", | ||
"scripts": { | ||
"test": "mocha --reporter dot" | ||
"test": "jscs . && mocha --reporter dot", | ||
"browserify": "browserify --standalone csso lib/index.js | uglifyjs --compress --mangle -o dist/csso-browser.js", | ||
"gh-pages": "git clone -b gh-pages https://github.com/css/csso.git .gh-pages && npm run browserify && cp dist/csso-browser.js .gh-pages/ && cd .gh-pages && git commit -am \"update\" && git push && cd .. && rm -rf .gh-pages" | ||
}, | ||
"dependencies": { | ||
"clap": "^1.0.8" | ||
}, | ||
"devDependencies": { | ||
"mocha": "~2.3.3" | ||
"browserify": "11.x", | ||
"jscs": "^2.3.0", | ||
"mocha": "~2.3.3", | ||
"uglify-js": ">= 2.4.24" | ||
}, | ||
"engines": { | ||
"node": ">=0.8.0" | ||
} | ||
"node": ">=0.12.0" | ||
}, | ||
"files": [ | ||
"bin", | ||
"dist", | ||
"lib", | ||
"HISTORY.md", | ||
"LICENSE", | ||
"README.md" | ||
] | ||
} |
[![NPM version](https://img.shields.io/npm/v/csso.svg)](https://www.npmjs.com/package/csso) | ||
[![Build Status](https://travis-ci.org/css/csso.svg?branch=master)](https://travis-ci.org/css/csso) | ||
[![Dependency Status](https://img.shields.io/david/css/csso.svg)](https://david-dm.org/css/csso) | ||
[![devDependency Status](https://img.shields.io/david/dev/css/csso.svg?style=flat)](https://david-dm.org/css/csso#info=devDependencies) | ||
# English | ||
CSSO (CSS Optimizer) is a CSS minimizer unlike others. In addition to usual minification techniques it can perform structural optimization of CSS files, resulting in smaller file size compared to other minifiers. | ||
See detailed information on [bem.info/tools/optimizers/csso](https://bem.info/tools/optimizers/csso/). | ||
## Install | ||
# 中文 | ||
``` | ||
npm install -g csso | ||
``` | ||
CSSO (CSS 优化器) 是一个与众不同的CSS代码压缩器。相比其他压缩器,除了常用的压缩技术外,它还会通过重建CSS代码结构信息的优化技术从而使文件压缩到更小的尺寸。 | ||
## Usage | ||
访问[bem.info/tools/optimizers/csso](https://bem.info/tools/optimizers/csso/)获取更详细的信息。 | ||
### Command line | ||
# 日本語 | ||
``` | ||
csso [input] [output] [options] | ||
CSSO (CSSオプティマイザー)は、他とは違ったCSS縮小化ツールです。 一般的な縮小化テクニックに加えてCSSファイルの構造的な最適化も行うので、 他の縮小化ツールと比べてより軽量にすることが可能です。 | ||
Options: | ||
詳細な情報は[bem.info/tools/optimizers/csso](https://bem.info/tools/optimizers/csso/)を参照してください。 | ||
--debug Output intermediate state of CSS during compression | ||
-h, --help Output usage information | ||
-i, --input <filename> Input file | ||
-o, --output <filename> Output file (result outputs to stdout if not set) | ||
--restructure-off Turns structure minimization off | ||
-v, --version Output the version | ||
``` | ||
# Русский | ||
Some examples: | ||
CSSO (CSS Optimizer) является минимизатором CSS, выполняющим как минимизацию без изменения структуры, так и структурную минимизацию с целью получить как можно меньший текст. | ||
``` | ||
> csso in.css out.css | ||
Детальное описание смотри на [ru.bem.info/tools/optimizers/csso](https://ru.bem.info/tools/optimizers/csso/). | ||
> csso in.css | ||
...output result in stdout... | ||
# Українська | ||
> echo ".test { color: #ff0000; }" | csso | ||
.test{color:red} | ||
CSSO (CSS Optimizer) є CSS-мінімізатор не схожий на інші. На додачу до звичайних технік мініфікації він може виконувати й структурну оптимізацію файлів CSS, що дозволяє отримати менший розмір файлу, в порівнянні з іншими мініфікаторами. | ||
> cat source1.css source2.css | csso | gzip -9 -c > production.css.gz | ||
``` | ||
Детальнішу інформацію шукайте на [bem.info/tools/optimizers/csso](https://bem.info/tools/optimizers/csso/). | ||
### API | ||
# 한국어 | ||
```js | ||
var csso = require('csso'); | ||
CSSO (CSS Optimizer)는 다른 CSS압축툴과는 다릅니다. 일반적인 압축 기법에 더불어 CSS파일의 구조를 최적화하여 다른 툴에 비해 더 작은 파일로 만들 수 있습니다. | ||
var compressed = csso.minify('.test { color: #ff0000; }'); | ||
console.log(compressed); | ||
// .test{color:red} | ||
상세한 정보는 [bem.info/tools/optimizers/csso](https://bem.info/tools/optimizers/csso/)를 참고바랍니다. | ||
// you may do it step by step | ||
var ast = csso.parse('.test { color: #ff0000; }'); | ||
ast = csso.compress(ast); | ||
var compressed = csso.translate(ast, true); | ||
console.log(compressed); | ||
// .test{color:red} | ||
``` | ||
<!-- Yandex.Metrika counter --> | ||
<img src="https://mc.yandex.ru/watch/12831025" style="position:absolute; left:-9999px;" alt="" /> | ||
<!-- /Yandex.Metrika counter --> | ||
## Documentation | ||
> May be outdated | ||
- [English](https://github.com/css/csso/blob/master/docs/index/index.en.md) | ||
- [Русский](https://github.com/css/csso/blob/master/docs/index/index.ru.md) | ||
- [日本語](https://github.com/css/csso/blob/master/docs/index/index.ja.md) | ||
- [한국어](https://github.com/css/csso/blob/master/docs/index/index.ko.md) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
70
217943
1
4
22
4871
1
4
+ Addedclap@^1.0.8
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedclap@1.2.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)