At this point, there is a key part of PostCSS we need to cover: the order we use when calling plugins in our task runner file. This might seem a little odd, but there are two good reasons for considering this when developing with PostCSS:
The first reason is simple—it's about making sure that we maintain a logical order of when tasks are completed at compilation.
The second is a little more obscure, and will come with experience—some plugins need to be defined in the task file in a certain order, for them to work correctly.
Let's explore what this means:
If we take a look at the gulp task file that we've slowly been building up, you will notice a key difference between lines 13 and 19; and no, it's not the task name, before you ask! The difference is the ['lint-styles']
constraint—this forces Gulp not to run this task until its predecessor has completed:
I know this might sound like common sense, and that I am only preaching what you may already know, but getting...