Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fed_dev/deps.ts>postcss.Processor#process

A Bundler with the web in mind.
Latest
method postcss.Processor.prototype.process
Re-export
import { postcss } from "https://deno.land/x/fed_dev@0.9.0/deps.ts";
const { Processor } = postcss;

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.