Skip to content
This repository has been archived by the owner on Sep 25, 2020. It is now read-only.

autoprefix a minified file results in expanded css file #35

Closed
rgruyters opened this issue Mar 7, 2014 · 2 comments
Closed

autoprefix a minified file results in expanded css file #35

rgruyters opened this issue Mar 7, 2014 · 2 comments

Comments

@rgruyters
Copy link

I have a Gruntfile with the following tasks:

sass: {
  build: {
    options: {
      style: 'compressed',
      sourcemap: true,
      precision: 7
    },
    files: [{
      expand: true,
      cwd: '<%= assets.sass %>',
      src: ['*.scss'],
      dest: '<%= assets.css %>',
      ext: '.css'
    }]
  }
},

autoprefixer: {
  options: {
    browsers: ['last 2 version'],
  },
  no_dest: {
    src: '<%= assets.css %>/!(*.min).css'
  }
}

When I run this autoprefix expands the CSS file.

Is it possible to minify the file after autoprefixer has been finished? (or leave it minified)
I know you can use cssmin (or csso) to minify the CSS file, but then the sourceMap entry gets removed from file.

For the record I have grunt-autoprefixer@0.4.2 installed.

@rgruyters
Copy link
Author

Never mind. After updating to the latest version, 0.7.2, it keeps the file minified. (also updates the source map)

@nDmitry
Copy link
Owner

nDmitry commented Mar 7, 2014

Yeah, that behavior was fixed in Autoprefixer 1.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants