Skip to content

Update README.md to include install instructions #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 27, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@

## Usage

Install `postcss-loader`:

```js
npm install postcss-loader --save-dev
```

Set `postcss` section in webpack config:

```js
Expand All @@ -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
Expand All @@ -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 = {
Expand Down Expand Up @@ -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:
Expand Down