Skip to content

Instantly share code, notes, and snippets.

@MervinPraison
Last active June 23, 2017 15:07
Show Gist options
  • Select an option

  • Save MervinPraison/7f1e012cccb3f38f84f21b68e9103a22 to your computer and use it in GitHub Desktop.

Select an option

Save MervinPraison/7f1e012cccb3f38f84f21b68e9103a22 to your computer and use it in GitHub Desktop.
Grunt Minify and Combine + Minify CSS
module.exports = function(grunt) {
grunt.initConfig({
cssmin: {
options: {
mergeIntoShorthands: false,
roundingPrecision: -1
},
target: {
files: {
'output.css': ['foo.css', 'bar.css']
}
}
},
cssmin: {
target: {
files: [{
expand: true,
cwd: 'release/css',
src: ['*.css', '!*.min.css'],
dest: 'release/css',
ext: '.min.css'
}]
}
}
});
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.registerTask('default', ["cssmin"]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment