From 629ce71db5037664a17be10c67b6d6fa3649b845 Mon Sep 17 00:00:00 2001 From: stylesuxx Date: Sat, 21 Nov 2015 16:30:54 +0100 Subject: [PATCH] Added some information about the usage of the postcss functionality - #163 --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index e57f452..e403c84 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Out of the box it comes with support for: - Webpack - ES2015 via Babel-Loader - Different supported style languages (sass, scss, less, stylus) +- Style transformations via PostCSS - Automatic code linting via esLint - Ability to unit test components via Karma and Mocha/Chai @@ -64,6 +65,27 @@ Stateless functional components where introduced in React v0.14. They have a muc ___Note___: You will still be able to set properties for stateless components! +## Adding PostCSS plugins +If you have enabled [PostCSS](https://github.com/postcss/postcss) at generation time, install your PostCSS plugins via npm and *require* it in **postcss** function in *cfg/base.js*. + +Example for autoprefixer: +```bash +cd my-new-project +npm install autoprefixer +``` +Require in *cfg/base.js* +```JavaScript +... +postcss: function () { + return [ + require('autoprefixer')({ + browsers: ['last 2 versions', 'ie >= 8'] + }) + ]; +} +... +``` + ## Usage The following commands are available in your project: ```bash