Questions tagged [gulp-clean-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.

33 questions
1
vote
1 answer

How to use gulp-clean-css to write a new -min.css file instead of the default of overwriting the existing css source file?

How to use gulp-clean-css to write a new -min.css file instead of the default of overwriting the existing CSS source file? Currently, I have this line which minifies the file. However, it overwrites the original with the minified version. I would…
Dan
  • 2,209
  • 3
  • 23
  • 44
1
vote
1 answer

Minify CSS with Gulp via .pipe

Is it possible to use a plugin such as clean-css, so the CSS is minified upon every page refresh/save..? How would I chain it via pipe so it reaches the dist folder minified? Thanks for any help! This is the current code: gulp.task('styles',…
DevJoe
  • 413
  • 1
  • 7
  • 20
1
vote
2 answers

Clean-Css task gives error in gulpfile : cannot read property 'on'

I am totally new to gulp and I wanted to add a task to minify and eventually clean any duplicates or unused css. My gulpfile is below, and for the moment I'm still in the process of learning. I know I will be using post-css and the modules that can…
mlclm
  • 725
  • 6
  • 16
  • 38
1
vote
0 answers

gulp sourcemaps and clean-css not working properly

The problem is I don't understand why in chrome my file name is app.css?_[sm] I expected it to be just app.css app.css is a minified file. What I really want to achieve is to link the file loaded in chrome source panel to my local file. Before I…
tfuelber
  • 85
  • 1
  • 9
1
vote
1 answer

Gulp sass to css: combine selectors with same property/values

I am trying to find any Gulp module that can combine css rules having same property/value. Following example demonstrates my problem. h2 { font-size: 14px; } p { font-size: 14px; } Output should be h2, p { font-size: 14px; } It would be…
Anwer AR
  • 155
  • 1
  • 16
1
vote
0 answers

Using gulp-clean-css and gulp-rename to minify and rename with .min.css prefix, but gulp erases style.min.css file

So, below is my entire gulp file. I have a style.css in my styles/src folder, and I want gulp to output a style.min.css file in my styles/dist folder. gulp-clean-css makes the minified file, and gulp-rename adds the .min suffix. When I have an…
Jon Nardini
  • 59
  • 1
  • 7
1
vote
1 answer

EACCES: permission denied on gulp css minify, same src and dest

I have a gulp task to build up everything which runs for dev (works fine). On release gulp task we do the same but also tack on a bundle task which also minifies the css. I want to just minify the css inline, meaning the same src and dest for the…
Joshua Ohana
  • 5,613
  • 12
  • 56
  • 112
1
vote
2 answers

Gulp - the best way of minifying multiple css files into one?

What is the best way of minify multiple css files into one? The gulp task below causing two issues after the minification and concatenation: bootstraps glyphicons that I use have disappeared. some of my styles are broken. The task seems to have…
Run
  • 54,938
  • 169
  • 450
  • 748
1
vote
1 answer

Gulp Task: CleanCSS and Paths

I've created a task with Gulp that is supposed to: Join multiple CSS files; Minify + remove unnecessary CSS; Fix paths for url() directives and others; Generate source maps; My current code for this is: var gulp = require("gulp"), concat …
TCB13
  • 3,067
  • 2
  • 39
  • 68
1
vote
1 answer

run gulp-clean-css options in gulp-inline

How do I go about configuring options for a nested plugin in gulp? I have a gulp task that uses gulp-inline to inline any css and js. gulp-inline has options to set a css processor gulp.task('html', function () { gulp.src(source +…
Matt
  • 806
  • 3
  • 12
  • 32
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
0 answers

Why Gulp runs without errors but is not compiling the SCSS scripts?

I setted up my Gulpfile and so far it looked good. I had no errors anymore. Just looked a bit too fast as he compiled it. But if he would really do the job this wouldn't be any problem. But as i run my gulp css task it didn't compiled my SCSS files…
0
votes
0 answers

Stop clean-css from changing 'Crimson' to #dc143c in { font-type: 'Crimson Text' }

My project uses React, Isomorphic rendering, Gulp, and Webpack. We will be removing Gulp, but until then... I am using the styl for css/sass and I'm having an issue. I bring in a local npm package which uses precompiled css. My project is dependent…
Kevin Danikowski
  • 4,620
  • 6
  • 41
  • 75
0
votes
1 answer

Gulp + Less + Minify CSS error: concat multiple Less files?

How do you concat multiple Less files? For instance, I have functions.less with all the functions that I want to use them in the style.less: functions.less: .rotate (@deg) { -webkit-transform: rotate(@deg * 1deg); -moz-transform: rotate(@deg…
Run
  • 54,938
  • 169
  • 450
  • 748
0
votes
1 answer

TypeError: has no method 'isAbsolute'

I want to minify any css in my folder, where i use gulp-clean-css plugin for gulp. My code is: gulp.task('CSS-Pack', function () { return gulp.src(['Content/App.css', './Content/ApprovalForm.css']) …