Package Exports
- broccoli-clean-css
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (broccoli-clean-css) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
broccoli-clean-css
A Broccoli plugin to minify CSS with clean-css
a {
color: #ff0000;
}
b {
/* nothing */
}
↓
a{color:red}
Installation
npm install --save-dev broccoli-clean-css
API
const BroccoliCleanCss = require('broccoli-clean-css');
class BroccoliCleanCss(node [, options])
node: string
(directory path) or Object
(Broccoli node)
options: Object
(clean-css constructor options)
//Brocfile.js
const BroccoliCleanCss = require('broccoli-clean-css');
module.exports = new BroccoliCleanCss('path/to/styles');
There are some differences from the original clean-css:
returnPromise
option defaults totrue
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
Licensed under the MIT License.