Questions tagged [grunt-contrib-cssmin]

A grunt plug-in for compressing and combining CSS files

A grunt plug-in for compressing and combining CSS files: https://github.com/gruntjs/grunt-contrib-cssmin

76 questions
3
votes
0 answers

grunt-usemin relative image links

I have very common issue, read a lot of solutions (both stackoverflow and github issues), but still haven't found that would work for me. What I'm trying to solve: angularjs project, so Im using generator-angular (yeoman generator) SASS…
3
votes
1 answer

grunt continues to the next task before finishing sass task

this is my grunt file: 'use strict'; var path = require('path'); module.exports = function (grunt) { require('load-grunt-tasks')(grunt); require('time-grunt')(grunt); console.log(path.basename()); grunt.initConfig({ yeoman: { …
3
votes
1 answer

Grunt, TypeError: Object has no method 'Split'

I'm setting up Grunt for the first time and it has all been going smoothly (using Chris Coyier's 24 Ways article: http://24ways.org/2013/grunt-is-not-weird-and-hard/). Go figure, I step off the beaten path and I'm running into issues. I installed…
Chords
  • 6,720
  • 2
  • 39
  • 61
2
votes
1 answer

Grunt.js: Replace path when concat multiple CSS files from different directories

I'm trying to minify and combine multiple CSS files using Grunt.js concat and cssmin from different directories. Unfortunately, css breaks since each CSS has relative link to resources, for example: background-image: url('images/background.jpg'); I…
2
votes
1 answer

Naming multiple css files when minifying with Grunt

I have multiple css files that I'm minifying, is there a way to keep each of the minified files the same name as their css file? So for example, billing_edit.css, checkout.css, error_page.css would minify into billing_edit.min.css, checkout.min.css,…
Atom
  • 65
  • 2
  • 13
2
votes
0 answers

Grunt CSS min - Issue with minifying different CSS files

I'm having issue with minifying multiple CSS files using grunt cssmin I'm not looking to minify all files into single file. I would like to have the files having same name with min.css extension. My gruntfile.js is as follows. module.exports =…
Vaishak
  • 462
  • 2
  • 6
  • 17
2
votes
1 answer

Grunt cssmin / CleanCSS source map rebasing

I'm using cssmin with the following "Content" folder structure: src |--dir1 | |--style1.css | |--images | |--image1.png |--dir2 |--style2.css |--images |--image2.png dist |--styles.min.css |--styles.min.css.map Where…
2
votes
2 answers

Remove comments using Grunt and grunt-contrib-cssmin

I'm trying to remove all CSS comments using Grunt and grunt-contrib-cssmin, the CSS file is compiled and minified it has all comments. Comments should be removed with the line: keepSpecialComments: 0 module.exports = function(grunt) { …
Augusto Triste
  • 461
  • 7
  • 8
2
votes
2 answers

Keeping LESS sourceMaps for minified css with cssmin

My LESS files are compiled with grunt-contrib-less and corresponding grunt task with the following config: module.exports = { options: { sourceMap: true, sourceMapFilename: 'Content/styles/e-life.css.map' }, compile:…
rumirumi
  • 31
  • 3
2
votes
0 answers

Change relative paths in minified CSS with cssmin

Seems this is not solved besides being a recurrent question. This is my folder structure: project/ | |--src/ | |--images/ | +--styles/ | +--style.css | +--build/ |--images/ +--style.min.css Note how src/styles/style.css…
Naoise Golden
  • 8,793
  • 4
  • 49
  • 65
2
votes
0 answers

Grunt cssmin is not generating main.css

When I run grunt build --verbose it is telling me that >> Destination not written because minified CSS was empty.. I also notice that is says Files: [no src] -> dist/styles/main.css so if there is no source [no src] it makes sense there is nothing…
user883807
2
votes
2 answers

Grunt, css min to concat and minify all css

I have a bunch of various css from plugins and separate style sheets I am using, and I am trying to build a task that will combine and minify all of them. Right now I'm trying to do this with cssmin, I am not sure if I am on the right path, as this…
ajmajmajma
  • 13,712
  • 24
  • 79
  • 133
2
votes
2 answers

Grunt cssmin minified CSS is empty

I'm working on a Gruntfile for my projects. I've based this Gruntfile on the one included in the generator-webapp Yeoman generator. My Gruntfile looks like this: 'use strict'; var moment = require('moment'); var LIVERELOAD_PORT = 35729; var…
danielvdende
  • 690
  • 9
  • 23
1
vote
1 answer

How to define clean-css properties in Grunt to prevent 0% from being converted to 0

I am minifying my css file using the cssmin plugin in Grunt. I have noticed the the background property getting optimised. Gruntfile.js cssmin: { options: { // ... }, target: { files: [{ expand: true, …
Siddhant
  • 196
  • 2
  • 9
1
vote
1 answer

Grunt cssmin and timestamp filename

I'm trying to set up a grunt task that outputs a minified css file and changes the file name with a timestamp. My Gruntfile looks like this: module.exports = function (grunt) { //project configurations grunt.initConfig({ cssmin: { …
bauhau5
  • 15
  • 5