Skip to content

Update documentation around re-ordering plugins #57

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
Oct 20, 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
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ Options are merged recursively with the defaults. For example, adding new plugin

#### Adding additional plugins

By default the preprocessor uses all necessary plugins to build SUIT components. However additional plugins can be installed into a project and then added to the `use` array.
By default the preprocessor uses all necessary plugins to build SUIT components. However additional plugins can be installed into a project and then added to the `use` array. They will be appended to the existing list of plugins.

**Note**: This will not work with the preprocessor installed globally. Instead rely on the convenience of `npm run script`

Expand Down Expand Up @@ -404,39 +404,34 @@ If duplicate plugins are used they will be removed, but the new order will be re
```js
// Default order
var defaults = [
'postcss-easy-import',
'postcss-custom-properties',
'postcss-calc',
'postcss-color-function',
'postcss-custom-media',
'postcss-apply',
'autoprefixer',
'postcss-reporter'
];

// config
module.exports = {
use: [
'postcss-at2x',
'postcss-calc',
'autoprefixer',
'postcss-reporter'
]
};

var result = [
'postcss-easy-import',
'postcss-custom-properties',
'postcss-color-function',
'postcss-custom-media',
'postcss-apply',
'postcss-at2x',
'postcss-calc',
'autoprefixer',
'postcss-reporter'
];
```

**Note** Some core plugins such as `postcss-easy-import` and `autoprefixer`
cannot be re-ordered. This is to ensure components are preprocessed correctly.

#### Autoprefixer: vendor prefixes

By default the preprocessor uses the SUIT
Expand Down