Questions tagged [gulp-minify-css]

A Gulp plugin that minifies css with clean-css

A simple gulp plugin, which means it's nothing more than a thin wrapper around clean-css.


gulp-minify-css has been deprecated in favor of gulp-clean-css

20 questions
17
votes
2 answers

Remote font imports with css minification

I'm trying to concatenate & minify all bower package assets including css. One of them is bootswatch design and it imports google fonts. Problem is, running css tasks on it results in timeout exception. I'm guessing it is trying to download those…
Felini
  • 465
  • 4
  • 15
15
votes
2 answers

Gulp minifyCss remove special comments

I am using gulp minifyCss to minify my css to reduce filesize. My gulp task looks something like this: gulp.task('minify-css', function() { return gulp.src('styles/*.css') .pipe(concatCss("all.css").on('error', standardHandler)) …
user1995781
  • 19,085
  • 45
  • 135
  • 236
7
votes
1 answer

Prevent gulp to minify code on local machine

I started a project with [RDash angular dashboard][1] which using gulp. this is the first time I work with gulp and the problem is that while I'm working locally I can't debug because it minify css/js/html files. How can I prevent from gulp to…
Lior Bachar
  • 103
  • 2
  • 8
4
votes
1 answer

Bootstrap 4. CSS minification produces wrong results

I have installed Bootstrap 4.0-alpha with Bower and now I have a dist directory with precompiled bootstrap.css and bootstrap.min.css. In development environment I try to use not compressed version, but minified version within deployment. I use…
2
votes
1 answer

Minify multiple input file with postcss

I installed cssnano following these step: http://cssnano.co/guides/getting-started/ Into the root of my project i ran: npm install cssnano --save-dev After i installed postcss-cli: npm install postcss-cli --global Finally i created…
bobc82
  • 497
  • 7
  • 17
2
votes
2 answers

Minification error with minifycss

I've got this gulp css minification line: .pipe(minifycss({advanced:false, keepSpecialComments : 0}).on('error', gutil.log)) When i minify this css part: .mCS-rounded-dots.mCSB_scrollTools .mCSB_draggerRail, .mCS-rounded-dots-dark.mCSB_scrollTools…
Mike
  • 5,416
  • 4
  • 40
  • 73
2
votes
1 answer

clean-css TypeError cannot read property '0' of null

I am trying to minify my code and i always get this error when it runs clean-css. /home/k1ngsley/Projects/mobile_rea/partners-mobile-app/node_modules/clean-css/lib/selectors/extractor.js:66 return name.replace(/^\-\w+\-/,…
Kingsley Simon
  • 2,090
  • 5
  • 38
  • 84
1
vote
0 answers

Concat and Minify not working / Gulp

I've got the following code to concatenate and minify my .css files : var gulp = require('gulp'), concatCSS = require('gulp-concat-css'), minifyCSS = require('gulp-minify-css'), rename = require('gulp-rename'), notify =…
Alexandr Belov
  • 1,804
  • 9
  • 30
  • 43
1
vote
0 answers

sourcemaps in gulp not mapping to files

I've been searching for related questions and found no answer (or question, for that matter) for this. Most questions are about wrong paths or sourcemaps not being generated, but I have not found anything like this. When I process this task, i get a…
0
votes
3 answers

Minify css + Gulp

I have this gulpfile.js to compile css but I also want to minify my css. I try to run many different codes that I found in the internet but none of them works. Could any one help me? Thanks var gulp = require('gulp'); var sass =…
Paulo Frutuoso
  • 179
  • 1
  • 3
  • 16
0
votes
0 answers

Gulp build not generating any files

I am using the following gulp code to build my deployment files. var gulp = require('gulp'); var concat = require('gulp-concat'); var minify = require('gulp-minify'); var cleanCss = require('gulp-clean-css'); gulp.task('pack-js', function () { …
Kunal
  • 1,440
  • 4
  • 14
  • 37
0
votes
1 answer

Why the task's output of gulp-clean-css for minify CSS is empty file?

I use gulp-clean-css as a gulp.task to minify CSS. My file path is css/mehr.css and the path of minified CSS will be css/mehr.min.css But when I run the task : gulp minify_css_task The mehr.min.css is created, but it's empty! output : [11:45:01]…
Mojtaba Arvin
  • 679
  • 1
  • 10
  • 21
0
votes
1 answer

Gulp Isn't Executing Minify-CSS

Here is what I have: var gulp = require('gulp'); var sass = require('gulp-sass'); var watch = require('gulp-watch'); var cleanCSS = require('gulp-clean-css'); var concat = require('gulp-concat'); // GULP WATCH gulp.task('watch', function() { …
tmcd
  • 355
  • 3
  • 16
0
votes
1 answer

Adding versioning in image path Sprite

I'm working on project that move in new version, when launch sprite became messy and need to be given versioning to check the latest addition only, sprite used now only sprite.png and sprite-2x.png. But when i generate with gulp css and gulp…
Aab
  • 23
  • 5
0
votes
1 answer

Why do minfiers reduce to one line

This question is similar to: Why do we have newlines in minified JavaScript? In this case, I would prefer half a dozen or so newlines. Why do minifiers reduce code and style to one line? Even on production code, I might have bugs that I didn't…
Cit5
  • 400
  • 5
  • 19
1
2