Skip to content

Commit fc91c46

Browse files
authored
Merge pull request #57 from suitcss/doc-update
Update documentation around re-ordering plugins
2 parents 2ba47a7 + 080f2d4 commit fc91c46

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ Options are merged recursively with the defaults. For example, adding new plugin
367367

368368
#### Adding additional plugins
369369

370-
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.
370+
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.
371371

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

@@ -404,39 +404,34 @@ If duplicate plugins are used they will be removed, but the new order will be re
404404
```js
405405
// Default order
406406
var defaults = [
407-
'postcss-easy-import',
408407
'postcss-custom-properties',
409408
'postcss-calc',
410409
'postcss-color-function',
411410
'postcss-custom-media',
412411
'postcss-apply',
413-
'autoprefixer',
414-
'postcss-reporter'
415412
];
416413

417414
// config
418415
module.exports = {
419416
use: [
420417
'postcss-at2x',
421418
'postcss-calc',
422-
'autoprefixer',
423-
'postcss-reporter'
424419
]
425420
};
426421

427422
var result = [
428-
'postcss-easy-import',
429423
'postcss-custom-properties',
430424
'postcss-color-function',
431425
'postcss-custom-media',
432426
'postcss-apply',
433427
'postcss-at2x',
434428
'postcss-calc',
435-
'autoprefixer',
436-
'postcss-reporter'
437429
];
438430
```
439431

432+
**Note** Some core plugins such as `postcss-easy-import` and `autoprefixer`
433+
cannot be re-ordered. This is to ensure components are preprocessed correctly.
434+
440435
#### Autoprefixer: vendor prefixes
441436

442437
By default the preprocessor uses the SUIT

0 commit comments

Comments
 (0)