Skip to content
Brought to you by Allons-y Studio
dashly A standard library of filters, transforms, & shortcodes for Eleventy

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>

Allons-y Studio

Let's build something great together

A front-end & design systems studio helping teams ship consistent, accessible UI faster.