From 01ad3891ff1a451d7782f55fa6abfc9a976e2803 Mon Sep 17 00:00:00 2001 From: Wesley B Date: Sun, 27 Mar 2016 13:08:27 -0500 Subject: [PATCH] Update README.md to include install instructions - Add brief instructional step for installing this module. - Add notice about potential need to install plugins used in the example implementation. --- README.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3efd488d..47e4eb58 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,12 @@ ## Usage +Install `postcss-loader`: + +```js +npm install postcss-loader --save-dev +``` + Set `postcss` section in webpack config: ```js @@ -39,6 +45,12 @@ module.exports = { } ``` +> This example implementation uses two plugins that may need to be installed: +> ``` +> npm install autoprefixer --save-dev +> npm install precss --save-dev +> ``` + Now your CSS files requirements will be processed by selected PostCSS plugins: ```js @@ -65,7 +77,7 @@ If there is the need, this will let you access to webpack loaders API. ## Plugins Packs If you want to process different styles by different PostCSS plugins you can -define plugin packs in `postcss` section and use them by `?pack=name` parameter. +define plugin packs in `postcss` section and use them by `?pack=name` parameter. ```js module.exports = { @@ -93,7 +105,7 @@ module.exports = { ## Integration with postcss-import When using [postcss-import] plugin, you may want to tell webpack about -dependencies coming from your `@import` directives. +dependencies coming from your `@import` directives. For example: in watch mode, to enable recompile on change. Here is a simple way to let know postcss-import to pass files to webpack: