title: Using grunt-postcss - how do we run autoprefixer without the other plugins?
body: <p>I have a Gruntfile.js set up with Post CSS running autoprefixer, mqpacker, and cssnano at the moment.  </p>
  
  <p>I have a default grunt build that will work to build everything for deployment. It includes the call to postcss, like so:</p>
  
  <p><code>grunt.registerTask('default', ['sass', 'postcss', 'concat', 'uglify', 'browserSync', 'watch']);</code></p>
  
  <p>The issue is I also want the default grunt build process to be for everyday dev work - one that omits (turns off) the media query compilation and minification from Post CSS.</p>
  
  <p>However, I want to leave autoprefixer on. This wasn't a problem with grunt when autoprefixer ran as a separate program, we just make a new <code>grunt.registerTask</code>  </p>
  
  <p>Now that autoprefixer now runs inside of Post CSS, how do we make these different build processes work,  without commenting out the individual plugins in CSS (clumsy) and restarting grunt every time we want to do a different build?</p>
  
  <p>My Gruntfile:</p>
  
  <pre><code>module.exports = function(grunt) {
  
    // Project configuration.
    grunt.initConfig({
  
      // Sass to CSS
      sass: {
  
        app: {
  
          files: [{
            expand: true,
            cwd: 'scss',
            src: ['**/*.scss'],
            dest: 'css/src',
            ext: '.css'
          }]
  
        },
  
        options: {
          sourceMap: true,
          outputStyle: 'expanded',
          imagePath: "../"
        }
  
      },
  
  
      // Post CSS (autoprefixer, mqpacker, cssnano)
      postcss: {
  
          // Configuration
          options: {
  
              map: true,
  
              // Load plugins  
              processors: [
  
                  // Runs Post CSS Autoprefixer
                  require('autoprefixer')({browsers: ['last 2 versions']}),
  
                  // require('postcss-import')(),
  
                  require('css-mqpacker')(),
  
                  require('cssnano')({
                    autoprefixer: false, 
                    safe: true,
                    sourcemap: false
                  })
              ]
  
          },
  
          // Operate on compiled Sass, write global.css
          dist: {
              src: 'css/src/global-sass.css',
              dest: 'css/global.min.css'
  
          }
  
      },
  
      // JS Concatenation Plugin
      concat: {
  
          dist: {
              src: [
                  'js/libs/*.js',  // All JS in the libs folder
                  'js/src/*.js'   // All JS in the src folder
              ],
  
              dest: 'js/scripts.js'
          }
      },
  
  
      // JS Minification
      uglify: {
  
          build: {
  
              src: 'js/scripts.js',
  
              dest: 'js/scripts.min.js'
          }
      },
  
      // Image Minification -- run on demand w/ `grunt imagemin`
          imagemin: {
              dynamic: {
                  files: [{
                      expand: true,
                      cwd: 'img/src/',
                      src: ['**/*.{png,jpg,gif}'],
                      dest: 'img/'
                  }]
              }
          },
  
  
      // BrowserSync
      browserSync: {
  
        dev: {
  
            bsFiles: {
  
                src : [
                    'css/*.css',
                    '**/*.{html}'
                ]
  
            },
  
            options: {
                watchTask: true,
                server: './'
            }
        }
      },
  
  
      // Watch
      watch: {
  
        sass: {
          files: ['scss/{,*/}*.{scss,sass}'],
          tasks: ['sass', 'postcss']
        },
  
        js: {
          files: ['js/src/*.js'],
          tasks: ['concat', 'uglify']
        },
  
        options: {
          livereload: false,
          spawn: false
        }
  
      },
  
    });
  
    // Loads Grunt Tasks
    grunt.loadNpmTasks('grunt-sass');
    grunt.loadNpmTasks('grunt-postcss');
    grunt.loadNpmTasks('grunt-browser-sync');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-imagemin');
  
  
    // Default Task
    grunt.registerTask('default', ['sass', 'postcss', 'concat', 'uglify', 'browserSync', 'watch']);
  
  };
  </code></pre>