broccoli-pleeease
v0.2.1
Published
Postprocess CSS with ease (and Broccoli.js)
Downloads
4
Maintainers
Readme
broccoli-pleeease
Postprocess CSS using Pleeease
DEPRECATED
This module has been deprecated in favor of working directly with PostCSS. Please look to broccoli-postcss for a full post-processing solution, and broccoli-sass, broccoli-less-single or broccoli-stylus-single for preprocessing.
Here's the full list of PostCSS plugins used by Pleeease:
- autoprefixer
- css-mqpacker
- csswring
- pixrem
- pleeease-filters
- postcss-import
- postcss-opacity
- postcss-pseudoelements
- postcss-url
- postcss-vmin
Install
$ npm install --save-dev broccoli-pleeease
Usage
var pleeease = require('broccoli-pleeease');
var tree = 'fixture';
var options = {
autoprefixer: {
browsers: ['last 5 versions', 'Android 2.3'],
cascade: false
},
import: {
path: 'fixture'
},
mqpacker: true
};
module.exports = pleeease(tree, options);
Inlining @import'ed files
In Broccoli, file paths in plugins are resolved relative to the Brocfile per default, not to each processed file. Therefore, it's possible that pleeease will throw an error upon trying to inline any files you've imported in your CSS, since the @import
paths won't line up properly between pleeease and your source files.
To work around this, you can specify a path
property that's the same as the root of your Broccoli tree on the import
object in the options you pass to pleeease. This only works for @import
statements in files that reside at the root of the Broccoli tree, though.
License
MIT © Fredrik Ekelund