Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shinnn/broccoli-clean-css
A Broccoli plugin to minify CSS with clean-css
https://github.com/shinnn/broccoli-clean-css
broccoli broccoli-plugin clean-css css javascript minification nodejs optimization stylesheet
Last synced: 26 days ago
JSON representation
A Broccoli plugin to minify CSS with clean-css
- Host: GitHub
- URL: https://github.com/shinnn/broccoli-clean-css
- Owner: shinnn
- License: mit
- Created: 2014-02-24T11:35:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-10-28T23:32:53.000Z (about 4 years ago)
- Last Synced: 2024-10-10T07:52:46.764Z (about 1 month ago)
- Topics: broccoli, broccoli-plugin, clean-css, css, javascript, minification, nodejs, optimization, stylesheet
- Language: JavaScript
- Homepage:
- Size: 156 KB
- Stars: 13
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# broccoli-clean-css
[![npm version](https://img.shields.io/npm/v/broccoli-clean-css.svg)](https://www.npmjs.com/package/broccoli-clean-css)
[![Build Status](https://travis-ci.com/shinnn/broccoli-clean-css.svg?branch=master)](https://travis-ci.com/shinnn/broccoli-clean-css)
[![codecov](https://codecov.io/gh/shinnn/broccoli-clean-css/branch/master/graph/badge.svg)](https://codecov.io/gh/shinnn/broccoli-clean-css)A [Broccoli](https://github.com/broccolijs/broccoli) plugin to minify CSS with [clean-css](https://github.com/jakubpawlowicz/clean-css)
```css
a {
color: #ff0000;
}b {
/* nothing */
}
```↓
```css
a{color:red}
```## Installation
[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).
```
npm install --save-dev broccoli-clean-css
```## API
```javascript
const BroccoliCleanCss = require('broccoli-clean-css');
```### class BroccoliCleanCss(*node* [, *options*])
*node*: `string` (directory path) or `Object` ([Broccoli node](https://github.com/broccolijs/broccoli/blob/master/docs/node-api.md#part-2-node-api-specification))
*options*: `Object` ([clean-css constructor options](https://github.com/jakubpawlowicz/clean-css#constructor-options))```javascript
//Brocfile.js
const BroccoliCleanCss = require('broccoli-clean-css');module.exports = new BroccoliCleanCss('path/to/styles');
```There are some differences from the original [clean-css](https://www.npmjs.com/package/clean-css):
* `returnPromise` option defaults to `true` and cannot be disabled.
* All problems that clean-css considers as *warnings*, for example broken CSS syntax, are regarded as errors.## License
Copyright (c) 2014 - 2019 [Watanabe Shinnosuke](https://github.com/shinnn)
Licensed under [the MIT License](./LICENSE).