Skip to content
Takes a CSS file and creates vendor-specific builds for delivery based on the browser engine.
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tasks
.gitignore
Gruntfile.js
LICENSE-MIT
README.md
package.json

README.md

grunt-vendor-mutator

A Node Based Task to split a given CSS file into Vendor Specific versions to reduce prefix bloating.

Getting Started

This plugin requires Grunt ~0.4.1

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-vendor-mutator --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-vendor-mutator');

The "vendor_mutator" task

The task works slighty different than others, as the destination includes a placeholder:

grunt.initConfig({
  vendorize: {
    dist: {
      src: 'css/style.css',
      dest: 'css/style.{vendor}.css'
    }
  }
});

{vendor} gets replaced with either webkit, gecko or trident. Running your grunt task will now produce the following destination files:

  • css/style.webkit.css
  • css/style.gecko.css
  • css/style.trident.css

That's it, really!

You can’t perform that action at this time.