Function transform

  • Given a file path to a css file, this will apply a postcss plugin to transform the file, and write it back to disk.

    See the plugin docs for postcss for more information.

    Parameters

    • filePath: string

      to the file to transform

    • plugin: Plugin

    Returns Promise<void>

    Example

    import { css } from 'ember-apply';

    await css.transform('path/to/file.css', {
    Once(root) {
    root.walkRules(rule => {
    rule.walkDecls(decl => {
    decl.prop = decl.prop.split('').reverse().join('');
    });
    });
    }
    });

Generated using TypeDoc