Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
method Processor.prototype.process
Re-export
import { Processor } from "https://deno.land/x/postcss@8.4.16/lib/postcss.js";

Parses source CSS and returns a LazyResult Promise proxy. Because some plugins can be asynchronous it doesn’t make any transformations. Transformations will be applied in the LazyResult methods.

processor.process(css, { from: 'a.css', to: 'a.out.css' })
  .then(result => {
     console.log(result.css)
  })

Parameters

css:
| string
| { toString(): string; }
| Root

String with input CSS or any object with a toString() method, like a Buffer. Optionally, senda Result instance and the processor will take the Root from it.

optional
options: ProcessOptions

Options.

Returns

LazyResult | NoWorkResult

Promise proxy.