mirror of
https://github.com/react-webpack-generators/generator-react-webpack.git
synced 2025-12-08 18:01:59 +00:00
Added some information about the usage of the postcss functionality - #163
This commit is contained in:
parent
3a10311c47
commit
629ce71db5
22
README.md
22
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user