Search


Search something to see results

transformFile

Transform css file

Parameters

  • file: string

    url or path

  • options: TransformOptions = {}
  • asStream: boolean = false

    load file as stream

Returns Promise<TransformResult>

Example:


import {transform} from '@tbela99/css-parser/web';

// remote file
let result = await transform({file: 'https://docs.deno.com/styles.css'});
console.log(result.code);

// local file
result = await transform({file: './css/styles.css'});
console.log(result.code);