postcss-clean
PostCSS plugin to minify CSS with clean-css

postcss-clean downloads postcss-clean version postcss-clean license

postcss-clean類似パッケージ:
npmのダウンロードトレンド
3 年
🌟 postcss-cleanのREADME.mdにリアルタイム使用チャートを表示するには、以下のコードをコピーしてください。
## Usage Trend
[![Usage Trend of postcss-clean](https://npm-compare.com/img/npm-trend/THREE_YEARS/postcss-clean.png)](https://npm-compare.com/postcss-clean#timeRange=THREE_YEARS)
Cumulative GitHub Star Trend
🌟 postcss-cleanのREADME.mdにGitHub Starsトレンドチャートを表示するには、以下のコードをコピーしてください。
## GitHub Stars Trend
[![GitHub Stars Trend of postcss-clean](https://npm-compare.com/img/github-trend/postcss-clean.png)](https://npm-compare.com/postcss-clean)
統計詳細
パッケージ
ダウンロード数
Stars
サイズ
Issues
公開日時
ライセンス
postcss-clean14,82943-125年前MIT
postcss-clean のREADME

postcss-clean GitHub Workflow Status (branch) NPM Coveralls branch NPM Monthly Downloads

PostCss plugin to minify your CSS

Compression will be handled by clean-css, which according to this benchmark is one of the top (probably the best) libraries for minifying CSS.

Install

With npm do:

npm install postcss-clean --save

Example

Input

.try {
  color: #607d8b;
  width: 32px;
}

Output

.try{color:#607d8b;width:32px}

Input

:host {
  display: block;
}

:host ::content {
  & > * {
    color: var(--primary-color);
  }
}

Output

:host{display:block}:host ::content>*{color:var(--my-color)}

Note this example assumes you combined postcss-clean with other plugins (e.g. postcss-nesting).

API

clean([options])

Note that postcss-clean is an asynchronous processor. It cannot be used like this:

var out = postcss([ clean() ]).process(css).css;
console.log(out)

Instead make sure your runner uses the async APIs:

postcss([ clean() ]).process(css).then(function(out) {
    console.log(out.css);
});

options

It simply proxies the clean-css options. See the complete list of options here.

Usage

See the PostCSS documentation for examples for your environment.

Contributing

Pull requests are welcome.

License

MIT © Leonardo Di Donato


Analytics