Processor instance. This instance can be used on multiple Stylesheets.
postcss default export function returns a
Processor instance. The main purpose of this module is to process the plugins, which is called
Normalization here, add to the
plugins data member for storage and return a
stores a list of plugins added to this
takes in a plugin to append to the list of plugins and returns instance of
Parses CSS (can be passed in as various types) to return
Array< plugin > are argument. For each of the plugin, the following steps are done:
- Normalization involves a preprocessing step where
postcss === true, it is executed immediately as function without argument.
postcsscontains any other truthy value, then the object is destructured to set
postcssas top level value.
- Next step involves added the plugins to normalized list.
Array, the plugins are merged to the normalized plugin list.
plugin.postcssPluginis truthy, it is appended to normalized plugin list.
'function'directs becomes eligible to be added in normalized list.
- Other types are naturally eligible to enter the error conditions.
Takes in CSS either as
string or already parsed
Root, to pass
Root to new instance of
Result. Along with
plugins are also added as data members to this.
This is a very simple data structure to store fields (like a POJO):
optsMain processing logic is present in other modules. Here, both
toStringreturns the same
Processors. If they are
Promise must be returned.
Result and returns
A simple structure that is used to get debug info i.e. source and location of the error and the plugin that is causing this. It has got a self-explanatory
Processor takes an Array of
AcceptedPlugin which can be of type:
Processor- The current
Processorinstance will copy this