postcss
In Transforms
PostCSS processing helper for Eleventy bundles or addExtension('css', ...)
setups. Requires postcss as a peer dependency.
import { processCSS } from '@allons-y/dashly/transforms/postcss';
processCSS(content, inputPath, outputPath, config?)
Run a CSS string through PostCSS using the plugins and options supplied in
config (the shape returned by postcss-load-config). If a source map is
produced it is written next to the CSS output as <name>.css.map.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
content
|
string |
||
inputPath
|
string |
||
outputPath
|
string |
||
config
(optional)
|
{ plugins?: import('postcss').AcceptedPlugin[], options?: import('postcss').ProcessOptions } |
Returns
Promise<string>