How to use the autoprefixer.apply function in autoprefixer

To help you get started, we’ve selected a few autoprefixer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github McNull / angular-block-ui / gulp-tasks / lib / gulp-autoprefixer-map.js View on Github external
}

    if(!file.isNull()) {

      if(file.sourceMap) {
        options.map = {
          prev: file.sourceMap.mappings ? file.sourceMap : undefined,
          annotation: false,
          sourcesContent: true
        };
        options.to = options.from = file.relative;
      }

      var contents = file.contents.toString();

      var result = prefix.apply(this, browsers).process(contents, options);
      contents = result.css;

      file.contents = new Buffer(contents);

      if(file.sourceMap) {
        var map = JSON.parse(result.map.toString());

        map.sources = file.sourceMap.sources;
        map.file = file.sourceMap.file;

        file.sourceMap = map;

        //applySourceMap(file, map);
      }
    }